Networking Forums

Networking Forums > Computer Networking > Linux Networking > newbee q?

Reply
 
 
Uday Mullangi
Guest
Posts: n/a

 
      08-31-2004, 05:57 PM
Hi,
I am learning to write a driver for linux OS.
I am reading O'Reilly book for this purpose.

I am getting the following error when i do "insmod"
##insmod -f skull.o
##skull.o: couldn't find the kernel version the module was compiled for


Below is my code:
**************
#define MODULE
#include <linux/ioport.h>
#include <linux/errno.h>
#include <linux/init.h>


static int port = 0x2080,range=200;
static int skull_detect(unsigned int port, unsigned int range)
{
int err;

// if((err =check_region(port_range)) < 0) return err;
/* if(skull_probe_hw(port_range) != 0) return -ENODEV; */
request_region(port,range,"skull");
return 0;
}

static void skull_release(unsigned int port,unsigned int range)
{
release_region(port,range);
}

int init_module(void)
{
int rc;
printk("<1> .... Inside Init.... \n");
rc = skull_detect(port,range);
printk("<1> rc = %d",rc);
return 0;
}

void cleanup_module(void)
{
printk("<1>..... Exit Module ....\n");
skull_release(port,range);
}
*********************

Could anyone suggest me what could be the problem...

Thanks
Uday


 
Reply With Quote
 
 
 
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Ping newbee question B.W. Wireless Networks 10 10-17-2006 03:56 AM
Newbee question ? LaRrY Wireless Internet 1 08-23-2005 06:13 AM
AOL and Router SWAMRU-54108 Newbee!!!!! HELP! Colin Home Networking 3 03-29-2005 10:32 PM
Newbee to Networking EDO8109 Wireless Internet 6 07-12-2004 05:28 PM
A Linux newbee Jim Charier Linux Networking 7 11-04-2003 05:22 PM



1 2 3 4 5 6 7 8 9 10 11