- From: Wiktor Grebla <greblus_at_poczta.onet.pl>
- Date: Tue, 27 Sep 2005 13:04:52 +0200
Hi folks. As can be seen here, kernel API has changed a bit: http://thread.gmane.org/gmane.linux.kernel/311695 Attached is a patch against comedi-cvs, hope this helps to see what has changed (no backwards compatibility added). Regards, W.
diff -ur comedi.orig/comedi/comedi_fops.c comedi.new/comedi/comedi_fops.c
--- comedi.orig/comedi/comedi_fops.c 2005-09-27 12:46:33.000000000 +0200
+++ comedi.new/comedi/comedi_fops.c 2005-09-27 12:32:09.000000000 +0200
_at__at_ -1784,7 +1784,7 _at__at_
};
#endif
-static struct class_simple *comedi_class;
+static struct class *comedi_class;
static int __init comedi_init(void)
{
_at__at_ -1795,7 +1795,7 _at__at_
printk("comedi: unable to get major %d\n",COMEDI_MAJOR);
return -EIO;
}
- comedi_class = class_simple_create(THIS_MODULE, "comedi");
+ comedi_class = class_create(THIS_MODULE, "comedi");
if(IS_ERR(comedi_class))
{
printk("comedi: failed to create class");
_at__at_ -1805,7 +1805,7 _at__at_
comedi_devices=(comedi_device *)kmalloc(sizeof(comedi_device)*COMEDI_NDEVICES,GFP_KERNEL);
if(!comedi_devices)
{
- class_simple_destroy(comedi_class);
+ class_destroy(comedi_class);
devfs_unregister_chrdev(COMEDI_MAJOR,"comedi");
return -ENOMEM;
}
_at__at_ -1823,7 +1823,7 _at__at_
sprintf(name, "comedi%d", i);
devfs_register(NULL, name, DEVFS_FL_DEFAULT,
COMEDI_MAJOR, i, 0666 | S_IFCHR, &comedi_fops, NULL);
- class_simple_device_add(comedi_class, MKDEV(COMEDI_MAJOR, i), NULL, "comedi%i", i);
+ class_device_create(comedi_class, MKDEV(COMEDI_MAJOR, i), NULL, "comedi%i", i);
}
comedi_rt_init();
_at__at_ -1840,12 +1840,12 _at__at_
for(i=0;i<COMEDI_NDEVICES;i++){
char name[20];
- class_simple_device_remove(MKDEV(COMEDI_MAJOR, i));
+ class_device_destroy(comedi_class, MKDEV(COMEDI_MAJOR, i));
sprintf(name, "comedi%d", i);
devfs_unregister(devfs_find_handle(NULL, name,
COMEDI_MAJOR, i, DEVFS_SPECIAL_CHR, 0));
}
- class_simple_destroy(comedi_class);
+ class_destroy(comedi_class);
devfs_unregister_chrdev(COMEDI_MAJOR,"comedi");
comedi_proc_cleanup();
Received on 2005-09-27Z10:04:52