Subversion Repositories f9daq

Compare Revisions

Ignore whitespace Rev 42 → Rev 43

/pcivme-3.2/driver/main.c
116,7 → 116,7
return result;
}
 
static irqreturn_t pcivme_irqhandler(int irq, void *dev_id, struct pt_regs *regs)
static irqreturn_t pcivme_irqhandler(int irq, void *dev_id )
{
DEVICE_OBJ *pd = (DEVICE_OBJ *)dev_id;
 
367,7 → 367,8
#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(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 )
#endif
{
int pos = 0;
420,12 → 421,15
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 =
{
435,6 → 439,10
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)
573,7 → 581,9
 
return 0;
#else
return create_proc_read_entry(DEVICE_NAME, 0, NULL, pcivme_read_proc, NULL) ? 0 : -ENODEV;
// 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;
#endif
}