Loading drivers/isdn/capi/capi.c +7 −7 Original line number Original line Diff line number Diff line Loading @@ -58,7 +58,7 @@ MODULE_LICENSE("GPL"); /* -------- driver information -------------------------------------- */ /* -------- driver information -------------------------------------- */ static struct class_simple *capi_class; static struct class *capi_class; static int capi_major = 68; /* allocated */ static int capi_major = 68; /* allocated */ #ifdef CONFIG_ISDN_CAPI_MIDDLEWARE #ifdef CONFIG_ISDN_CAPI_MIDDLEWARE Loading Loading @@ -1499,20 +1499,20 @@ static int __init capi_init(void) return -EIO; return -EIO; } } capi_class = class_simple_create(THIS_MODULE, "capi"); capi_class = class_create(THIS_MODULE, "capi"); if (IS_ERR(capi_class)) { if (IS_ERR(capi_class)) { unregister_chrdev(capi_major, "capi20"); unregister_chrdev(capi_major, "capi20"); return PTR_ERR(capi_class); return PTR_ERR(capi_class); } } class_simple_device_add(capi_class, MKDEV(capi_major, 0), NULL, "capi"); class_device_create(capi_class, MKDEV(capi_major, 0), NULL, "capi"); devfs_mk_cdev(MKDEV(capi_major, 0), S_IFCHR | S_IRUSR | S_IWUSR, devfs_mk_cdev(MKDEV(capi_major, 0), S_IFCHR | S_IRUSR | S_IWUSR, "isdn/capi20"); "isdn/capi20"); #ifdef CONFIG_ISDN_CAPI_MIDDLEWARE #ifdef CONFIG_ISDN_CAPI_MIDDLEWARE if (capinc_tty_init() < 0) { if (capinc_tty_init() < 0) { class_simple_device_remove(MKDEV(capi_major, 0)); class_device_destroy(capi_class, MKDEV(capi_major, 0)); class_simple_destroy(capi_class); class_destroy(capi_class); unregister_chrdev(capi_major, "capi20"); unregister_chrdev(capi_major, "capi20"); return -ENOMEM; return -ENOMEM; } } Loading @@ -1539,8 +1539,8 @@ static void __exit capi_exit(void) { { proc_exit(); proc_exit(); class_simple_device_remove(MKDEV(capi_major, 0)); class_device_destroy(capi_class, MKDEV(capi_major, 0)); class_simple_destroy(capi_class); class_destroy(capi_class); unregister_chrdev(capi_major, "capi20"); unregister_chrdev(capi_major, "capi20"); devfs_remove("isdn/capi20"); devfs_remove("isdn/capi20"); Loading drivers/macintosh/adb.c +4 −5 Original line number Original line Diff line number Diff line Loading @@ -77,7 +77,7 @@ static struct adb_driver *adb_driver_list[] = { NULL NULL }; }; static struct class_simple *adb_dev_class; static struct class *adb_dev_class; struct adb_driver *adb_controller; struct adb_driver *adb_controller; struct notifier_block *adb_client_list = NULL; struct notifier_block *adb_client_list = NULL; Loading Loading @@ -902,9 +902,8 @@ adbdev_init(void) devfs_mk_cdev(MKDEV(ADB_MAJOR, 0), S_IFCHR | S_IRUSR | S_IWUSR, "adb"); devfs_mk_cdev(MKDEV(ADB_MAJOR, 0), S_IFCHR | S_IRUSR | S_IWUSR, "adb"); adb_dev_class = class_simple_create(THIS_MODULE, "adb"); adb_dev_class = class_create(THIS_MODULE, "adb"); if (IS_ERR(adb_dev_class)) { if (IS_ERR(adb_dev_class)) return; return; } class_device_create(adb_dev_class, MKDEV(ADB_MAJOR, 0), NULL, "adb"); class_simple_device_add(adb_dev_class, MKDEV(ADB_MAJOR, 0), NULL, "adb"); } } drivers/media/dvb/dvb-core/dvbdev.c +6 −7 Original line number Original line Diff line number Diff line Loading @@ -56,8 +56,7 @@ static const char * const dnames[] = { #define nums2minor(num,type,id) ((num << 6) | (id << 4) | type) #define nums2minor(num,type,id) ((num << 6) | (id << 4) | type) #define MAX_DVB_MINORS (DVB_MAX_ADAPTERS*64) #define MAX_DVB_MINORS (DVB_MAX_ADAPTERS*64) struct class_simple *dvb_class; static struct class *dvb_class; EXPORT_SYMBOL(dvb_class); static struct dvb_device* dvbdev_find_device (int minor) static struct dvb_device* dvbdev_find_device (int minor) { { Loading Loading @@ -236,7 +235,7 @@ int dvb_register_device(struct dvb_adapter *adap, struct dvb_device **pdvbdev, S_IFCHR | S_IRUSR | S_IWUSR, S_IFCHR | S_IRUSR | S_IWUSR, "dvb/adapter%d/%s%d", adap->num, dnames[type], id); "dvb/adapter%d/%s%d", adap->num, dnames[type], id); class_simple_device_add(dvb_class, MKDEV(DVB_MAJOR, nums2minor(adap->num, type, id)), class_device_create(dvb_class, MKDEV(DVB_MAJOR, nums2minor(adap->num, type, id)), NULL, "dvb%d.%s%d", adap->num, dnames[type], id); NULL, "dvb%d.%s%d", adap->num, dnames[type], id); dprintk("DVB: register adapter%d/%s%d @ minor: %i (0x%02x)\n", dprintk("DVB: register adapter%d/%s%d @ minor: %i (0x%02x)\n", Loading @@ -256,7 +255,7 @@ void dvb_unregister_device(struct dvb_device *dvbdev) devfs_remove("dvb/adapter%d/%s%d", dvbdev->adapter->num, devfs_remove("dvb/adapter%d/%s%d", dvbdev->adapter->num, dnames[dvbdev->type], dvbdev->id); dnames[dvbdev->type], dvbdev->id); class_simple_device_remove(MKDEV(DVB_MAJOR, nums2minor(dvbdev->adapter->num, class_device_destroy(dvb_class, MKDEV(DVB_MAJOR, nums2minor(dvbdev->adapter->num, dvbdev->type, dvbdev->id))); dvbdev->type, dvbdev->id))); list_del (&dvbdev->list_head); list_del (&dvbdev->list_head); Loading Loading @@ -412,7 +411,7 @@ static int __init init_dvbdev(void) devfs_mk_dir("dvb"); devfs_mk_dir("dvb"); dvb_class = class_simple_create(THIS_MODULE, "dvb"); dvb_class = class_create(THIS_MODULE, "dvb"); if (IS_ERR(dvb_class)) { if (IS_ERR(dvb_class)) { retval = PTR_ERR(dvb_class); retval = PTR_ERR(dvb_class); goto error; goto error; Loading @@ -429,7 +428,7 @@ static int __init init_dvbdev(void) static void __exit exit_dvbdev(void) static void __exit exit_dvbdev(void) { { devfs_remove("dvb"); devfs_remove("dvb"); class_simple_destroy(dvb_class); class_destroy(dvb_class); cdev_del(&dvb_device_cdev); cdev_del(&dvb_device_cdev); unregister_chrdev_region(MKDEV(DVB_MAJOR, 0), MAX_DVB_MINORS); unregister_chrdev_region(MKDEV(DVB_MAJOR, 0), MAX_DVB_MINORS); } } Loading drivers/net/ppp_generic.c +7 −7 Original line number Original line Diff line number Diff line Loading @@ -273,7 +273,7 @@ static int ppp_connect_channel(struct channel *pch, int unit); static int ppp_disconnect_channel(struct channel *pch); static int ppp_disconnect_channel(struct channel *pch); static void ppp_destroy_channel(struct channel *pch); static void ppp_destroy_channel(struct channel *pch); static struct class_simple *ppp_class; static struct class *ppp_class; /* Translates a PPP protocol number to a NP index (NP == network protocol) */ /* Translates a PPP protocol number to a NP index (NP == network protocol) */ static inline int proto_to_npindex(int proto) static inline int proto_to_npindex(int proto) Loading Loading @@ -858,12 +858,12 @@ static int __init ppp_init(void) printk(KERN_INFO "PPP generic driver version " PPP_VERSION "\n"); printk(KERN_INFO "PPP generic driver version " PPP_VERSION "\n"); err = register_chrdev(PPP_MAJOR, "ppp", &ppp_device_fops); err = register_chrdev(PPP_MAJOR, "ppp", &ppp_device_fops); if (!err) { if (!err) { ppp_class = class_simple_create(THIS_MODULE, "ppp"); ppp_class = class_create(THIS_MODULE, "ppp"); if (IS_ERR(ppp_class)) { if (IS_ERR(ppp_class)) { err = PTR_ERR(ppp_class); err = PTR_ERR(ppp_class); goto out_chrdev; goto out_chrdev; } } class_simple_device_add(ppp_class, MKDEV(PPP_MAJOR, 0), NULL, "ppp"); class_device_create(ppp_class, MKDEV(PPP_MAJOR, 0), NULL, "ppp"); err = devfs_mk_cdev(MKDEV(PPP_MAJOR, 0), err = devfs_mk_cdev(MKDEV(PPP_MAJOR, 0), S_IFCHR|S_IRUSR|S_IWUSR, "ppp"); S_IFCHR|S_IRUSR|S_IWUSR, "ppp"); if (err) if (err) Loading @@ -876,8 +876,8 @@ static int __init ppp_init(void) return err; return err; out_class: out_class: class_simple_device_remove(MKDEV(PPP_MAJOR,0)); class_device_destroy(ppp_class, MKDEV(PPP_MAJOR,0)); class_simple_destroy(ppp_class); class_destroy(ppp_class); out_chrdev: out_chrdev: unregister_chrdev(PPP_MAJOR, "ppp"); unregister_chrdev(PPP_MAJOR, "ppp"); goto out; goto out; Loading Loading @@ -2654,8 +2654,8 @@ static void __exit ppp_cleanup(void) if (unregister_chrdev(PPP_MAJOR, "ppp") != 0) if (unregister_chrdev(PPP_MAJOR, "ppp") != 0) printk(KERN_ERR "PPP: failed to unregister PPP device\n"); printk(KERN_ERR "PPP: failed to unregister PPP device\n"); devfs_remove("ppp"); devfs_remove("ppp"); class_simple_device_remove(MKDEV(PPP_MAJOR, 0)); class_device_destroy(ppp_class, MKDEV(PPP_MAJOR, 0)); class_simple_destroy(ppp_class); class_destroy(ppp_class); } } /* /* Loading drivers/net/wan/cosa.c +6 −6 Original line number Original line Diff line number Diff line Loading @@ -235,7 +235,7 @@ static int dma[MAX_CARDS+1]; static int irq[MAX_CARDS+1] = { -1, -1, -1, -1, -1, -1, 0, }; static int irq[MAX_CARDS+1] = { -1, -1, -1, -1, -1, -1, 0, }; /* for class stuff*/ /* for class stuff*/ static struct class_simple *cosa_class; static struct class *cosa_class; #ifdef MODULE #ifdef MODULE module_param_array(io, int, NULL, 0); module_param_array(io, int, NULL, 0); Loading Loading @@ -394,19 +394,19 @@ static int __init cosa_init(void) goto out; goto out; } } devfs_mk_dir("cosa"); devfs_mk_dir("cosa"); cosa_class = class_simple_create(THIS_MODULE, "cosa"); cosa_class = class_create(THIS_MODULE, "cosa"); if (IS_ERR(cosa_class)) { if (IS_ERR(cosa_class)) { err = PTR_ERR(cosa_class); err = PTR_ERR(cosa_class); goto out_chrdev; goto out_chrdev; } } for (i=0; i<nr_cards; i++) { for (i=0; i<nr_cards; i++) { class_simple_device_add(cosa_class, MKDEV(cosa_major, i), class_device_create(cosa_class, MKDEV(cosa_major, i), NULL, "cosa%d", i); NULL, "cosa%d", i); err = devfs_mk_cdev(MKDEV(cosa_major, i), err = devfs_mk_cdev(MKDEV(cosa_major, i), S_IFCHR|S_IRUSR|S_IWUSR, S_IFCHR|S_IRUSR|S_IWUSR, "cosa/%d", i); "cosa/%d", i); if (err) { if (err) { class_simple_device_remove(MKDEV(cosa_major, i)); class_device_destroy(cosa_class, MKDEV(cosa_major, i)); goto out_chrdev; goto out_chrdev; } } } } Loading @@ -427,10 +427,10 @@ static void __exit cosa_exit(void) printk(KERN_INFO "Unloading the cosa module\n"); printk(KERN_INFO "Unloading the cosa module\n"); for (i=0; i<nr_cards; i++) { for (i=0; i<nr_cards; i++) { class_simple_device_remove(MKDEV(cosa_major, i)); class_device_destroy(cosa_class, MKDEV(cosa_major, i)); devfs_remove("cosa/%d", i); devfs_remove("cosa/%d", i); } } class_simple_destroy(cosa_class); class_destroy(cosa_class); devfs_remove("cosa"); devfs_remove("cosa"); for (cosa=cosa_cards; nr_cards--; cosa++) { for (cosa=cosa_cards; nr_cards--; cosa++) { /* Clean up the per-channel data */ /* Clean up the per-channel data */ Loading Loading
drivers/isdn/capi/capi.c +7 −7 Original line number Original line Diff line number Diff line Loading @@ -58,7 +58,7 @@ MODULE_LICENSE("GPL"); /* -------- driver information -------------------------------------- */ /* -------- driver information -------------------------------------- */ static struct class_simple *capi_class; static struct class *capi_class; static int capi_major = 68; /* allocated */ static int capi_major = 68; /* allocated */ #ifdef CONFIG_ISDN_CAPI_MIDDLEWARE #ifdef CONFIG_ISDN_CAPI_MIDDLEWARE Loading Loading @@ -1499,20 +1499,20 @@ static int __init capi_init(void) return -EIO; return -EIO; } } capi_class = class_simple_create(THIS_MODULE, "capi"); capi_class = class_create(THIS_MODULE, "capi"); if (IS_ERR(capi_class)) { if (IS_ERR(capi_class)) { unregister_chrdev(capi_major, "capi20"); unregister_chrdev(capi_major, "capi20"); return PTR_ERR(capi_class); return PTR_ERR(capi_class); } } class_simple_device_add(capi_class, MKDEV(capi_major, 0), NULL, "capi"); class_device_create(capi_class, MKDEV(capi_major, 0), NULL, "capi"); devfs_mk_cdev(MKDEV(capi_major, 0), S_IFCHR | S_IRUSR | S_IWUSR, devfs_mk_cdev(MKDEV(capi_major, 0), S_IFCHR | S_IRUSR | S_IWUSR, "isdn/capi20"); "isdn/capi20"); #ifdef CONFIG_ISDN_CAPI_MIDDLEWARE #ifdef CONFIG_ISDN_CAPI_MIDDLEWARE if (capinc_tty_init() < 0) { if (capinc_tty_init() < 0) { class_simple_device_remove(MKDEV(capi_major, 0)); class_device_destroy(capi_class, MKDEV(capi_major, 0)); class_simple_destroy(capi_class); class_destroy(capi_class); unregister_chrdev(capi_major, "capi20"); unregister_chrdev(capi_major, "capi20"); return -ENOMEM; return -ENOMEM; } } Loading @@ -1539,8 +1539,8 @@ static void __exit capi_exit(void) { { proc_exit(); proc_exit(); class_simple_device_remove(MKDEV(capi_major, 0)); class_device_destroy(capi_class, MKDEV(capi_major, 0)); class_simple_destroy(capi_class); class_destroy(capi_class); unregister_chrdev(capi_major, "capi20"); unregister_chrdev(capi_major, "capi20"); devfs_remove("isdn/capi20"); devfs_remove("isdn/capi20"); Loading
drivers/macintosh/adb.c +4 −5 Original line number Original line Diff line number Diff line Loading @@ -77,7 +77,7 @@ static struct adb_driver *adb_driver_list[] = { NULL NULL }; }; static struct class_simple *adb_dev_class; static struct class *adb_dev_class; struct adb_driver *adb_controller; struct adb_driver *adb_controller; struct notifier_block *adb_client_list = NULL; struct notifier_block *adb_client_list = NULL; Loading Loading @@ -902,9 +902,8 @@ adbdev_init(void) devfs_mk_cdev(MKDEV(ADB_MAJOR, 0), S_IFCHR | S_IRUSR | S_IWUSR, "adb"); devfs_mk_cdev(MKDEV(ADB_MAJOR, 0), S_IFCHR | S_IRUSR | S_IWUSR, "adb"); adb_dev_class = class_simple_create(THIS_MODULE, "adb"); adb_dev_class = class_create(THIS_MODULE, "adb"); if (IS_ERR(adb_dev_class)) { if (IS_ERR(adb_dev_class)) return; return; } class_device_create(adb_dev_class, MKDEV(ADB_MAJOR, 0), NULL, "adb"); class_simple_device_add(adb_dev_class, MKDEV(ADB_MAJOR, 0), NULL, "adb"); } }
drivers/media/dvb/dvb-core/dvbdev.c +6 −7 Original line number Original line Diff line number Diff line Loading @@ -56,8 +56,7 @@ static const char * const dnames[] = { #define nums2minor(num,type,id) ((num << 6) | (id << 4) | type) #define nums2minor(num,type,id) ((num << 6) | (id << 4) | type) #define MAX_DVB_MINORS (DVB_MAX_ADAPTERS*64) #define MAX_DVB_MINORS (DVB_MAX_ADAPTERS*64) struct class_simple *dvb_class; static struct class *dvb_class; EXPORT_SYMBOL(dvb_class); static struct dvb_device* dvbdev_find_device (int minor) static struct dvb_device* dvbdev_find_device (int minor) { { Loading Loading @@ -236,7 +235,7 @@ int dvb_register_device(struct dvb_adapter *adap, struct dvb_device **pdvbdev, S_IFCHR | S_IRUSR | S_IWUSR, S_IFCHR | S_IRUSR | S_IWUSR, "dvb/adapter%d/%s%d", adap->num, dnames[type], id); "dvb/adapter%d/%s%d", adap->num, dnames[type], id); class_simple_device_add(dvb_class, MKDEV(DVB_MAJOR, nums2minor(adap->num, type, id)), class_device_create(dvb_class, MKDEV(DVB_MAJOR, nums2minor(adap->num, type, id)), NULL, "dvb%d.%s%d", adap->num, dnames[type], id); NULL, "dvb%d.%s%d", adap->num, dnames[type], id); dprintk("DVB: register adapter%d/%s%d @ minor: %i (0x%02x)\n", dprintk("DVB: register adapter%d/%s%d @ minor: %i (0x%02x)\n", Loading @@ -256,7 +255,7 @@ void dvb_unregister_device(struct dvb_device *dvbdev) devfs_remove("dvb/adapter%d/%s%d", dvbdev->adapter->num, devfs_remove("dvb/adapter%d/%s%d", dvbdev->adapter->num, dnames[dvbdev->type], dvbdev->id); dnames[dvbdev->type], dvbdev->id); class_simple_device_remove(MKDEV(DVB_MAJOR, nums2minor(dvbdev->adapter->num, class_device_destroy(dvb_class, MKDEV(DVB_MAJOR, nums2minor(dvbdev->adapter->num, dvbdev->type, dvbdev->id))); dvbdev->type, dvbdev->id))); list_del (&dvbdev->list_head); list_del (&dvbdev->list_head); Loading Loading @@ -412,7 +411,7 @@ static int __init init_dvbdev(void) devfs_mk_dir("dvb"); devfs_mk_dir("dvb"); dvb_class = class_simple_create(THIS_MODULE, "dvb"); dvb_class = class_create(THIS_MODULE, "dvb"); if (IS_ERR(dvb_class)) { if (IS_ERR(dvb_class)) { retval = PTR_ERR(dvb_class); retval = PTR_ERR(dvb_class); goto error; goto error; Loading @@ -429,7 +428,7 @@ static int __init init_dvbdev(void) static void __exit exit_dvbdev(void) static void __exit exit_dvbdev(void) { { devfs_remove("dvb"); devfs_remove("dvb"); class_simple_destroy(dvb_class); class_destroy(dvb_class); cdev_del(&dvb_device_cdev); cdev_del(&dvb_device_cdev); unregister_chrdev_region(MKDEV(DVB_MAJOR, 0), MAX_DVB_MINORS); unregister_chrdev_region(MKDEV(DVB_MAJOR, 0), MAX_DVB_MINORS); } } Loading
drivers/net/ppp_generic.c +7 −7 Original line number Original line Diff line number Diff line Loading @@ -273,7 +273,7 @@ static int ppp_connect_channel(struct channel *pch, int unit); static int ppp_disconnect_channel(struct channel *pch); static int ppp_disconnect_channel(struct channel *pch); static void ppp_destroy_channel(struct channel *pch); static void ppp_destroy_channel(struct channel *pch); static struct class_simple *ppp_class; static struct class *ppp_class; /* Translates a PPP protocol number to a NP index (NP == network protocol) */ /* Translates a PPP protocol number to a NP index (NP == network protocol) */ static inline int proto_to_npindex(int proto) static inline int proto_to_npindex(int proto) Loading Loading @@ -858,12 +858,12 @@ static int __init ppp_init(void) printk(KERN_INFO "PPP generic driver version " PPP_VERSION "\n"); printk(KERN_INFO "PPP generic driver version " PPP_VERSION "\n"); err = register_chrdev(PPP_MAJOR, "ppp", &ppp_device_fops); err = register_chrdev(PPP_MAJOR, "ppp", &ppp_device_fops); if (!err) { if (!err) { ppp_class = class_simple_create(THIS_MODULE, "ppp"); ppp_class = class_create(THIS_MODULE, "ppp"); if (IS_ERR(ppp_class)) { if (IS_ERR(ppp_class)) { err = PTR_ERR(ppp_class); err = PTR_ERR(ppp_class); goto out_chrdev; goto out_chrdev; } } class_simple_device_add(ppp_class, MKDEV(PPP_MAJOR, 0), NULL, "ppp"); class_device_create(ppp_class, MKDEV(PPP_MAJOR, 0), NULL, "ppp"); err = devfs_mk_cdev(MKDEV(PPP_MAJOR, 0), err = devfs_mk_cdev(MKDEV(PPP_MAJOR, 0), S_IFCHR|S_IRUSR|S_IWUSR, "ppp"); S_IFCHR|S_IRUSR|S_IWUSR, "ppp"); if (err) if (err) Loading @@ -876,8 +876,8 @@ static int __init ppp_init(void) return err; return err; out_class: out_class: class_simple_device_remove(MKDEV(PPP_MAJOR,0)); class_device_destroy(ppp_class, MKDEV(PPP_MAJOR,0)); class_simple_destroy(ppp_class); class_destroy(ppp_class); out_chrdev: out_chrdev: unregister_chrdev(PPP_MAJOR, "ppp"); unregister_chrdev(PPP_MAJOR, "ppp"); goto out; goto out; Loading Loading @@ -2654,8 +2654,8 @@ static void __exit ppp_cleanup(void) if (unregister_chrdev(PPP_MAJOR, "ppp") != 0) if (unregister_chrdev(PPP_MAJOR, "ppp") != 0) printk(KERN_ERR "PPP: failed to unregister PPP device\n"); printk(KERN_ERR "PPP: failed to unregister PPP device\n"); devfs_remove("ppp"); devfs_remove("ppp"); class_simple_device_remove(MKDEV(PPP_MAJOR, 0)); class_device_destroy(ppp_class, MKDEV(PPP_MAJOR, 0)); class_simple_destroy(ppp_class); class_destroy(ppp_class); } } /* /* Loading
drivers/net/wan/cosa.c +6 −6 Original line number Original line Diff line number Diff line Loading @@ -235,7 +235,7 @@ static int dma[MAX_CARDS+1]; static int irq[MAX_CARDS+1] = { -1, -1, -1, -1, -1, -1, 0, }; static int irq[MAX_CARDS+1] = { -1, -1, -1, -1, -1, -1, 0, }; /* for class stuff*/ /* for class stuff*/ static struct class_simple *cosa_class; static struct class *cosa_class; #ifdef MODULE #ifdef MODULE module_param_array(io, int, NULL, 0); module_param_array(io, int, NULL, 0); Loading Loading @@ -394,19 +394,19 @@ static int __init cosa_init(void) goto out; goto out; } } devfs_mk_dir("cosa"); devfs_mk_dir("cosa"); cosa_class = class_simple_create(THIS_MODULE, "cosa"); cosa_class = class_create(THIS_MODULE, "cosa"); if (IS_ERR(cosa_class)) { if (IS_ERR(cosa_class)) { err = PTR_ERR(cosa_class); err = PTR_ERR(cosa_class); goto out_chrdev; goto out_chrdev; } } for (i=0; i<nr_cards; i++) { for (i=0; i<nr_cards; i++) { class_simple_device_add(cosa_class, MKDEV(cosa_major, i), class_device_create(cosa_class, MKDEV(cosa_major, i), NULL, "cosa%d", i); NULL, "cosa%d", i); err = devfs_mk_cdev(MKDEV(cosa_major, i), err = devfs_mk_cdev(MKDEV(cosa_major, i), S_IFCHR|S_IRUSR|S_IWUSR, S_IFCHR|S_IRUSR|S_IWUSR, "cosa/%d", i); "cosa/%d", i); if (err) { if (err) { class_simple_device_remove(MKDEV(cosa_major, i)); class_device_destroy(cosa_class, MKDEV(cosa_major, i)); goto out_chrdev; goto out_chrdev; } } } } Loading @@ -427,10 +427,10 @@ static void __exit cosa_exit(void) printk(KERN_INFO "Unloading the cosa module\n"); printk(KERN_INFO "Unloading the cosa module\n"); for (i=0; i<nr_cards; i++) { for (i=0; i<nr_cards; i++) { class_simple_device_remove(MKDEV(cosa_major, i)); class_device_destroy(cosa_class, MKDEV(cosa_major, i)); devfs_remove("cosa/%d", i); devfs_remove("cosa/%d", i); } } class_simple_destroy(cosa_class); class_destroy(cosa_class); devfs_remove("cosa"); devfs_remove("cosa"); for (cosa=cosa_cards; nr_cards--; cosa++) { for (cosa=cosa_cards; nr_cards--; cosa++) { /* Clean up the per-channel data */ /* Clean up the per-channel data */ Loading