116,7 → 116,7 |
return result; |
} |
|
static irqreturn_t pcivme_irqhandler(int irq, void *dev_id ) |
static irqreturn_t pcivme_irqhandler(int irq, void *dev_id, struct pt_regs *regs) |
{ |
DEVICE_OBJ *pd = (DEVICE_OBJ *)dev_id; |
|
367,8 → 367,7 |
#if LINUX_VERSION_CODE < KERNEL_VERSION(2,3,0) |
static int pcivme_read_proc(char *buf, char **start, off_t offset, int len) |
#else |
//static int pcivme_read_proc(char *buf, char **start, off_t offset, int len, int *eof, void *data) |
static int pcivme_read_proc(struct file *filp,char *buf,size_t count,loff_t *offp ) |
static int pcivme_read_proc(char *buf, char **start, off_t offset, int len, int *eof, void *data) |
#endif |
{ |
int pos = 0; |
421,15 → 420,12 |
pos += sprintf(buf + pos, "\n"); |
|
#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,3,0) |
//*eof = 1; |
*eof = 1; |
#endif |
|
return pos; |
} |
|
|
|
|
#if LINUX_VERSION_CODE < KERNEL_VERSION(2,3,0) |
struct proc_dir_entry pcimod_proc_entry = |
{ |
439,10 → 435,6 |
nlink: 1, /* nlinks */ |
get_info: pcivme_read_proc, /* function used to read data */ |
}; |
#else |
struct file_operations proc_fops = { |
read: pcivme_read_proc |
}; |
#endif |
|
static void deleteMyLists(void) |
581,9 → 573,7 |
|
return 0; |
#else |
// create_proc_read_entry is depricated since kernel 3.10 |
//return create_proc_read_entry(DEVICE_NAME, 0, NULL, pcivme_read_proc, NULL) ? 0 : -ENODEV; |
return proc_create_data(DEVICE_NAME, 0, NULL, &pcivme_fops, NULL) ? 0 : -ENODEV; |
return create_proc_read_entry(DEVICE_NAME, 0, NULL, pcivme_read_proc, NULL) ? 0 : -ENODEV; |
#endif |
} |
|