Loading drivers/char/dsp56k.c +7 −7 Original line number Diff line number Diff line Loading @@ -144,7 +144,7 @@ static struct dsp56k_device { int tx_wsize, rx_wsize; } dsp56k; static struct class_simple *dsp56k_class; static struct class *dsp56k_class; static int dsp56k_reset(void) { Loading Loading @@ -510,12 +510,12 @@ static int __init dsp56k_init_driver(void) printk("DSP56k driver: Unable to register driver\n"); return -ENODEV; } dsp56k_class = class_simple_create(THIS_MODULE, "dsp56k"); dsp56k_class = class_create(THIS_MODULE, "dsp56k"); if (IS_ERR(dsp56k_class)) { err = PTR_ERR(dsp56k_class); goto out_chrdev; } class_simple_device_add(dsp56k_class, MKDEV(DSP56K_MAJOR, 0), NULL, "dsp56k"); class_device_create(dsp56k_class, MKDEV(DSP56K_MAJOR, 0), NULL, "dsp56k"); err = devfs_mk_cdev(MKDEV(DSP56K_MAJOR, 0), S_IFCHR | S_IRUSR | S_IWUSR, "dsp56k"); Loading @@ -526,8 +526,8 @@ static int __init dsp56k_init_driver(void) goto out; out_class: class_simple_device_remove(MKDEV(DSP56K_MAJOR, 0)); class_simple_destroy(dsp56k_class); class_device_destroy(dsp56k_class, MKDEV(DSP56K_MAJOR, 0)); class_destroy(dsp56k_class); out_chrdev: unregister_chrdev(DSP56K_MAJOR, "dsp56k"); out: Loading @@ -537,8 +537,8 @@ module_init(dsp56k_init_driver); static void __exit dsp56k_cleanup_driver(void) { class_simple_device_remove(MKDEV(DSP56K_MAJOR, 0)); class_simple_destroy(dsp56k_class); class_device_destroy(dsp56k_class, MKDEV(DSP56K_MAJOR, 0)); class_destroy(dsp56k_class); unregister_chrdev(DSP56K_MAJOR, "dsp56k"); devfs_remove("dsp56k"); } Loading drivers/char/ftape/zftape/zftape-init.c +15 −15 Original line number Diff line number Diff line Loading @@ -99,7 +99,7 @@ static struct file_operations zft_cdev = .release = zft_close, }; static struct class_simple *zft_class; static struct class *zft_class; /* Open floppy tape device */ Loading Loading @@ -329,29 +329,29 @@ KERN_INFO "installing zftape VFS interface for ftape driver ..."); TRACE_CATCH(register_chrdev(QIC117_TAPE_MAJOR, "zft", &zft_cdev),); zft_class = class_simple_create(THIS_MODULE, "zft"); zft_class = class_create(THIS_MODULE, "zft"); for (i = 0; i < 4; i++) { class_simple_device_add(zft_class, MKDEV(QIC117_TAPE_MAJOR, i), NULL, "qft%i", i); class_device_create(zft_class, MKDEV(QIC117_TAPE_MAJOR, i), NULL, "qft%i", i); devfs_mk_cdev(MKDEV(QIC117_TAPE_MAJOR, i), S_IFCHR | S_IRUSR | S_IWUSR, "qft%i", i); class_simple_device_add(zft_class, MKDEV(QIC117_TAPE_MAJOR, i + 4), NULL, "nqft%i", i); class_device_create(zft_class, MKDEV(QIC117_TAPE_MAJOR, i + 4), NULL, "nqft%i", i); devfs_mk_cdev(MKDEV(QIC117_TAPE_MAJOR, i + 4), S_IFCHR | S_IRUSR | S_IWUSR, "nqft%i", i); class_simple_device_add(zft_class, MKDEV(QIC117_TAPE_MAJOR, i + 16), NULL, "zqft%i", i); class_device_create(zft_class, MKDEV(QIC117_TAPE_MAJOR, i + 16), NULL, "zqft%i", i); devfs_mk_cdev(MKDEV(QIC117_TAPE_MAJOR, i + 16), S_IFCHR | S_IRUSR | S_IWUSR, "zqft%i", i); class_simple_device_add(zft_class, MKDEV(QIC117_TAPE_MAJOR, i + 20), NULL, "nzqft%i", i); class_device_create(zft_class, MKDEV(QIC117_TAPE_MAJOR, i + 20), NULL, "nzqft%i", i); devfs_mk_cdev(MKDEV(QIC117_TAPE_MAJOR, i + 20), S_IFCHR | S_IRUSR | S_IWUSR, "nzqft%i", i); class_simple_device_add(zft_class, MKDEV(QIC117_TAPE_MAJOR, i + 32), NULL, "rawqft%i", i); class_device_create(zft_class, MKDEV(QIC117_TAPE_MAJOR, i + 32), NULL, "rawqft%i", i); devfs_mk_cdev(MKDEV(QIC117_TAPE_MAJOR, i + 32), S_IFCHR | S_IRUSR | S_IWUSR, "rawqft%i", i); class_simple_device_add(zft_class, MKDEV(QIC117_TAPE_MAJOR, i + 36), NULL, "nrawrawqft%i", i); class_device_create(zft_class, MKDEV(QIC117_TAPE_MAJOR, i + 36), NULL, "nrawrawqft%i", i); devfs_mk_cdev(MKDEV(QIC117_TAPE_MAJOR, i + 36), S_IFCHR | S_IRUSR | S_IWUSR, "nrawqft%i", i); Loading Loading @@ -381,19 +381,19 @@ static void zft_exit(void) } for (i = 0; i < 4; i++) { devfs_remove("qft%i", i); class_simple_device_remove(MKDEV(QIC117_TAPE_MAJOR, i)); class_device_destroy(zft_class, MKDEV(QIC117_TAPE_MAJOR, i)); devfs_remove("nqft%i", i); class_simple_device_remove(MKDEV(QIC117_TAPE_MAJOR, i + 4)); class_device_destroy(zft_class, MKDEV(QIC117_TAPE_MAJOR, i + 4)); devfs_remove("zqft%i", i); class_simple_device_remove(MKDEV(QIC117_TAPE_MAJOR, i + 16)); class_device_destroy(zft_class, MKDEV(QIC117_TAPE_MAJOR, i + 16)); devfs_remove("nzqft%i", i); class_simple_device_remove(MKDEV(QIC117_TAPE_MAJOR, i + 20)); class_device_destroy(zft_class, MKDEV(QIC117_TAPE_MAJOR, i + 20)); devfs_remove("rawqft%i", i); class_simple_device_remove(MKDEV(QIC117_TAPE_MAJOR, i + 32)); class_device_destroy(zft_class, MKDEV(QIC117_TAPE_MAJOR, i + 32)); devfs_remove("nrawqft%i", i); class_simple_device_remove(MKDEV(QIC117_TAPE_MAJOR, i + 36)); class_device_destroy(zft_class, MKDEV(QIC117_TAPE_MAJOR, i + 36)); } class_simple_destroy(zft_class); class_destroy(zft_class); zft_uninit_mem(); /* release remaining memory, if any */ printk(KERN_INFO "zftape successfully unloaded.\n"); TRACE_EXIT; Loading drivers/char/ip2main.c +12 −12 Original line number Diff line number Diff line Loading @@ -302,7 +302,7 @@ static char rirqs[IP2_MAX_BOARDS]; static int Valid_Irqs[] = { 3, 4, 5, 7, 10, 11, 12, 15, 0}; /* for sysfs class support */ static struct class_simple *ip2_class; static struct class *ip2_class; // Some functions to keep track of what irq's we have Loading Loading @@ -414,9 +414,9 @@ cleanup_module(void) iiResetDelay( i2BoardPtrTable[i] ); /* free io addresses and Tibet */ release_region( ip2config.addr[i], 8 ); class_simple_device_remove(MKDEV(IP2_IPL_MAJOR, 4 * i)); class_device_destroy(ip2_class, MKDEV(IP2_IPL_MAJOR, 4 * i)); devfs_remove("ip2/ipl%d", i); class_simple_device_remove(MKDEV(IP2_IPL_MAJOR, 4 * i + 1)); class_device_destroy(ip2_class, MKDEV(IP2_IPL_MAJOR, 4 * i + 1)); devfs_remove("ip2/stat%d", i); } /* Disable and remove interrupt handler. */ Loading @@ -425,7 +425,7 @@ cleanup_module(void) clear_requested_irq( ip2config.irq[i]); } } class_simple_destroy(ip2_class); class_destroy(ip2_class); devfs_remove("ip2"); if ( ( err = tty_unregister_driver ( ip2_tty_driver ) ) ) { printk(KERN_ERR "IP2: failed to unregister tty driver (%d)\n", err); Loading Loading @@ -700,7 +700,7 @@ ip2_loadmain(int *iop, int *irqp, unsigned char *firmware, int firmsize) printk(KERN_ERR "IP2: failed to register IPL device (%d)\n", err ); } else { /* create the sysfs class */ ip2_class = class_simple_create(THIS_MODULE, "ip2"); ip2_class = class_create(THIS_MODULE, "ip2"); if (IS_ERR(ip2_class)) { err = PTR_ERR(ip2_class); goto out_chrdev; Loading @@ -722,25 +722,25 @@ ip2_loadmain(int *iop, int *irqp, unsigned char *firmware, int firmsize) } if ( NULL != ( pB = i2BoardPtrTable[i] ) ) { class_simple_device_add(ip2_class, MKDEV(IP2_IPL_MAJOR, class_device_create(ip2_class, MKDEV(IP2_IPL_MAJOR, 4 * i), NULL, "ipl%d", i); err = devfs_mk_cdev(MKDEV(IP2_IPL_MAJOR, 4 * i), S_IRUSR | S_IWUSR | S_IRGRP | S_IFCHR, "ip2/ipl%d", i); if (err) { class_simple_device_remove(MKDEV(IP2_IPL_MAJOR, 4 * i)); class_device_destroy(ip2_class, MKDEV(IP2_IPL_MAJOR, 4 * i)); goto out_class; } class_simple_device_add(ip2_class, MKDEV(IP2_IPL_MAJOR, class_device_create(ip2_class, MKDEV(IP2_IPL_MAJOR, 4 * i + 1), NULL, "stat%d", i); err = devfs_mk_cdev(MKDEV(IP2_IPL_MAJOR, 4 * i + 1), S_IRUSR | S_IWUSR | S_IRGRP | S_IFCHR, "ip2/stat%d", i); if (err) { class_simple_device_remove(MKDEV(IP2_IPL_MAJOR, 4 * i + 1)); class_device_destroy(ip2_class, MKDEV(IP2_IPL_MAJOR, 4 * i + 1)); goto out_class; } Loading Loading @@ -798,7 +798,7 @@ retry: goto out; out_class: class_simple_destroy(ip2_class); class_destroy(ip2_class); out_chrdev: unregister_chrdev(IP2_IPL_MAJOR, "ip2"); out: Loading drivers/char/istallion.c +5 −5 Original line number Diff line number Diff line Loading @@ -792,7 +792,7 @@ static int stli_timeron; /*****************************************************************************/ static struct class_simple *istallion_class; static struct class *istallion_class; #ifdef MODULE Loading Loading @@ -854,10 +854,10 @@ static void __exit istallion_module_exit(void) put_tty_driver(stli_serial); for (i = 0; i < 4; i++) { devfs_remove("staliomem/%d", i); class_simple_device_remove(MKDEV(STL_SIOMEMMAJOR, i)); class_device_destroy(istallion_class, MKDEV(STL_SIOMEMMAJOR, i)); } devfs_remove("staliomem"); class_simple_destroy(istallion_class); class_destroy(istallion_class); if ((i = unregister_chrdev(STL_SIOMEMMAJOR, "staliomem"))) printk("STALLION: failed to un-register serial memory device, " "errno=%d\n", -i); Loading Loading @@ -5242,12 +5242,12 @@ int __init stli_init(void) "device\n"); devfs_mk_dir("staliomem"); istallion_class = class_simple_create(THIS_MODULE, "staliomem"); istallion_class = class_create(THIS_MODULE, "staliomem"); for (i = 0; i < 4; i++) { devfs_mk_cdev(MKDEV(STL_SIOMEMMAJOR, i), S_IFCHR | S_IRUSR | S_IWUSR, "staliomem/%d", i); class_simple_device_add(istallion_class, MKDEV(STL_SIOMEMMAJOR, i), class_device_create(istallion_class, MKDEV(STL_SIOMEMMAJOR, i), NULL, "staliomem%d", i); } Loading drivers/char/lp.c +6 −6 Original line number Diff line number Diff line Loading @@ -146,7 +146,7 @@ static struct lp_struct lp_table[LP_NO]; static unsigned int lp_count = 0; static struct class_simple *lp_class; static struct class *lp_class; #ifdef CONFIG_LP_CONSOLE static struct parport *console_registered; // initially NULL Loading Loading @@ -804,7 +804,7 @@ static int lp_register(int nr, struct parport *port) if (reset) lp_reset(nr); class_simple_device_add(lp_class, MKDEV(LP_MAJOR, nr), NULL, class_device_create(lp_class, MKDEV(LP_MAJOR, nr), NULL, "lp%d", nr); devfs_mk_cdev(MKDEV(LP_MAJOR, nr), S_IFCHR | S_IRUGO | S_IWUGO, "printers/%d", nr); Loading Loading @@ -907,7 +907,7 @@ static int __init lp_init (void) } devfs_mk_dir("printers"); lp_class = class_simple_create(THIS_MODULE, "printer"); lp_class = class_create(THIS_MODULE, "printer"); if (IS_ERR(lp_class)) { err = PTR_ERR(lp_class); goto out_devfs; Loading @@ -930,7 +930,7 @@ static int __init lp_init (void) return 0; out_class: class_simple_destroy(lp_class); class_destroy(lp_class); out_devfs: devfs_remove("printers"); unregister_chrdev(LP_MAJOR, "lp"); Loading Loading @@ -981,10 +981,10 @@ static void lp_cleanup_module (void) continue; parport_unregister_device(lp_table[offset].dev); devfs_remove("printers/%d", offset); class_simple_device_remove(MKDEV(LP_MAJOR, offset)); class_device_destroy(lp_class, MKDEV(LP_MAJOR, offset)); } devfs_remove("printers"); class_simple_destroy(lp_class); class_destroy(lp_class); } __setup("lp=", lp_setup); Loading Loading
drivers/char/dsp56k.c +7 −7 Original line number Diff line number Diff line Loading @@ -144,7 +144,7 @@ static struct dsp56k_device { int tx_wsize, rx_wsize; } dsp56k; static struct class_simple *dsp56k_class; static struct class *dsp56k_class; static int dsp56k_reset(void) { Loading Loading @@ -510,12 +510,12 @@ static int __init dsp56k_init_driver(void) printk("DSP56k driver: Unable to register driver\n"); return -ENODEV; } dsp56k_class = class_simple_create(THIS_MODULE, "dsp56k"); dsp56k_class = class_create(THIS_MODULE, "dsp56k"); if (IS_ERR(dsp56k_class)) { err = PTR_ERR(dsp56k_class); goto out_chrdev; } class_simple_device_add(dsp56k_class, MKDEV(DSP56K_MAJOR, 0), NULL, "dsp56k"); class_device_create(dsp56k_class, MKDEV(DSP56K_MAJOR, 0), NULL, "dsp56k"); err = devfs_mk_cdev(MKDEV(DSP56K_MAJOR, 0), S_IFCHR | S_IRUSR | S_IWUSR, "dsp56k"); Loading @@ -526,8 +526,8 @@ static int __init dsp56k_init_driver(void) goto out; out_class: class_simple_device_remove(MKDEV(DSP56K_MAJOR, 0)); class_simple_destroy(dsp56k_class); class_device_destroy(dsp56k_class, MKDEV(DSP56K_MAJOR, 0)); class_destroy(dsp56k_class); out_chrdev: unregister_chrdev(DSP56K_MAJOR, "dsp56k"); out: Loading @@ -537,8 +537,8 @@ module_init(dsp56k_init_driver); static void __exit dsp56k_cleanup_driver(void) { class_simple_device_remove(MKDEV(DSP56K_MAJOR, 0)); class_simple_destroy(dsp56k_class); class_device_destroy(dsp56k_class, MKDEV(DSP56K_MAJOR, 0)); class_destroy(dsp56k_class); unregister_chrdev(DSP56K_MAJOR, "dsp56k"); devfs_remove("dsp56k"); } Loading
drivers/char/ftape/zftape/zftape-init.c +15 −15 Original line number Diff line number Diff line Loading @@ -99,7 +99,7 @@ static struct file_operations zft_cdev = .release = zft_close, }; static struct class_simple *zft_class; static struct class *zft_class; /* Open floppy tape device */ Loading Loading @@ -329,29 +329,29 @@ KERN_INFO "installing zftape VFS interface for ftape driver ..."); TRACE_CATCH(register_chrdev(QIC117_TAPE_MAJOR, "zft", &zft_cdev),); zft_class = class_simple_create(THIS_MODULE, "zft"); zft_class = class_create(THIS_MODULE, "zft"); for (i = 0; i < 4; i++) { class_simple_device_add(zft_class, MKDEV(QIC117_TAPE_MAJOR, i), NULL, "qft%i", i); class_device_create(zft_class, MKDEV(QIC117_TAPE_MAJOR, i), NULL, "qft%i", i); devfs_mk_cdev(MKDEV(QIC117_TAPE_MAJOR, i), S_IFCHR | S_IRUSR | S_IWUSR, "qft%i", i); class_simple_device_add(zft_class, MKDEV(QIC117_TAPE_MAJOR, i + 4), NULL, "nqft%i", i); class_device_create(zft_class, MKDEV(QIC117_TAPE_MAJOR, i + 4), NULL, "nqft%i", i); devfs_mk_cdev(MKDEV(QIC117_TAPE_MAJOR, i + 4), S_IFCHR | S_IRUSR | S_IWUSR, "nqft%i", i); class_simple_device_add(zft_class, MKDEV(QIC117_TAPE_MAJOR, i + 16), NULL, "zqft%i", i); class_device_create(zft_class, MKDEV(QIC117_TAPE_MAJOR, i + 16), NULL, "zqft%i", i); devfs_mk_cdev(MKDEV(QIC117_TAPE_MAJOR, i + 16), S_IFCHR | S_IRUSR | S_IWUSR, "zqft%i", i); class_simple_device_add(zft_class, MKDEV(QIC117_TAPE_MAJOR, i + 20), NULL, "nzqft%i", i); class_device_create(zft_class, MKDEV(QIC117_TAPE_MAJOR, i + 20), NULL, "nzqft%i", i); devfs_mk_cdev(MKDEV(QIC117_TAPE_MAJOR, i + 20), S_IFCHR | S_IRUSR | S_IWUSR, "nzqft%i", i); class_simple_device_add(zft_class, MKDEV(QIC117_TAPE_MAJOR, i + 32), NULL, "rawqft%i", i); class_device_create(zft_class, MKDEV(QIC117_TAPE_MAJOR, i + 32), NULL, "rawqft%i", i); devfs_mk_cdev(MKDEV(QIC117_TAPE_MAJOR, i + 32), S_IFCHR | S_IRUSR | S_IWUSR, "rawqft%i", i); class_simple_device_add(zft_class, MKDEV(QIC117_TAPE_MAJOR, i + 36), NULL, "nrawrawqft%i", i); class_device_create(zft_class, MKDEV(QIC117_TAPE_MAJOR, i + 36), NULL, "nrawrawqft%i", i); devfs_mk_cdev(MKDEV(QIC117_TAPE_MAJOR, i + 36), S_IFCHR | S_IRUSR | S_IWUSR, "nrawqft%i", i); Loading Loading @@ -381,19 +381,19 @@ static void zft_exit(void) } for (i = 0; i < 4; i++) { devfs_remove("qft%i", i); class_simple_device_remove(MKDEV(QIC117_TAPE_MAJOR, i)); class_device_destroy(zft_class, MKDEV(QIC117_TAPE_MAJOR, i)); devfs_remove("nqft%i", i); class_simple_device_remove(MKDEV(QIC117_TAPE_MAJOR, i + 4)); class_device_destroy(zft_class, MKDEV(QIC117_TAPE_MAJOR, i + 4)); devfs_remove("zqft%i", i); class_simple_device_remove(MKDEV(QIC117_TAPE_MAJOR, i + 16)); class_device_destroy(zft_class, MKDEV(QIC117_TAPE_MAJOR, i + 16)); devfs_remove("nzqft%i", i); class_simple_device_remove(MKDEV(QIC117_TAPE_MAJOR, i + 20)); class_device_destroy(zft_class, MKDEV(QIC117_TAPE_MAJOR, i + 20)); devfs_remove("rawqft%i", i); class_simple_device_remove(MKDEV(QIC117_TAPE_MAJOR, i + 32)); class_device_destroy(zft_class, MKDEV(QIC117_TAPE_MAJOR, i + 32)); devfs_remove("nrawqft%i", i); class_simple_device_remove(MKDEV(QIC117_TAPE_MAJOR, i + 36)); class_device_destroy(zft_class, MKDEV(QIC117_TAPE_MAJOR, i + 36)); } class_simple_destroy(zft_class); class_destroy(zft_class); zft_uninit_mem(); /* release remaining memory, if any */ printk(KERN_INFO "zftape successfully unloaded.\n"); TRACE_EXIT; Loading
drivers/char/ip2main.c +12 −12 Original line number Diff line number Diff line Loading @@ -302,7 +302,7 @@ static char rirqs[IP2_MAX_BOARDS]; static int Valid_Irqs[] = { 3, 4, 5, 7, 10, 11, 12, 15, 0}; /* for sysfs class support */ static struct class_simple *ip2_class; static struct class *ip2_class; // Some functions to keep track of what irq's we have Loading Loading @@ -414,9 +414,9 @@ cleanup_module(void) iiResetDelay( i2BoardPtrTable[i] ); /* free io addresses and Tibet */ release_region( ip2config.addr[i], 8 ); class_simple_device_remove(MKDEV(IP2_IPL_MAJOR, 4 * i)); class_device_destroy(ip2_class, MKDEV(IP2_IPL_MAJOR, 4 * i)); devfs_remove("ip2/ipl%d", i); class_simple_device_remove(MKDEV(IP2_IPL_MAJOR, 4 * i + 1)); class_device_destroy(ip2_class, MKDEV(IP2_IPL_MAJOR, 4 * i + 1)); devfs_remove("ip2/stat%d", i); } /* Disable and remove interrupt handler. */ Loading @@ -425,7 +425,7 @@ cleanup_module(void) clear_requested_irq( ip2config.irq[i]); } } class_simple_destroy(ip2_class); class_destroy(ip2_class); devfs_remove("ip2"); if ( ( err = tty_unregister_driver ( ip2_tty_driver ) ) ) { printk(KERN_ERR "IP2: failed to unregister tty driver (%d)\n", err); Loading Loading @@ -700,7 +700,7 @@ ip2_loadmain(int *iop, int *irqp, unsigned char *firmware, int firmsize) printk(KERN_ERR "IP2: failed to register IPL device (%d)\n", err ); } else { /* create the sysfs class */ ip2_class = class_simple_create(THIS_MODULE, "ip2"); ip2_class = class_create(THIS_MODULE, "ip2"); if (IS_ERR(ip2_class)) { err = PTR_ERR(ip2_class); goto out_chrdev; Loading @@ -722,25 +722,25 @@ ip2_loadmain(int *iop, int *irqp, unsigned char *firmware, int firmsize) } if ( NULL != ( pB = i2BoardPtrTable[i] ) ) { class_simple_device_add(ip2_class, MKDEV(IP2_IPL_MAJOR, class_device_create(ip2_class, MKDEV(IP2_IPL_MAJOR, 4 * i), NULL, "ipl%d", i); err = devfs_mk_cdev(MKDEV(IP2_IPL_MAJOR, 4 * i), S_IRUSR | S_IWUSR | S_IRGRP | S_IFCHR, "ip2/ipl%d", i); if (err) { class_simple_device_remove(MKDEV(IP2_IPL_MAJOR, 4 * i)); class_device_destroy(ip2_class, MKDEV(IP2_IPL_MAJOR, 4 * i)); goto out_class; } class_simple_device_add(ip2_class, MKDEV(IP2_IPL_MAJOR, class_device_create(ip2_class, MKDEV(IP2_IPL_MAJOR, 4 * i + 1), NULL, "stat%d", i); err = devfs_mk_cdev(MKDEV(IP2_IPL_MAJOR, 4 * i + 1), S_IRUSR | S_IWUSR | S_IRGRP | S_IFCHR, "ip2/stat%d", i); if (err) { class_simple_device_remove(MKDEV(IP2_IPL_MAJOR, 4 * i + 1)); class_device_destroy(ip2_class, MKDEV(IP2_IPL_MAJOR, 4 * i + 1)); goto out_class; } Loading Loading @@ -798,7 +798,7 @@ retry: goto out; out_class: class_simple_destroy(ip2_class); class_destroy(ip2_class); out_chrdev: unregister_chrdev(IP2_IPL_MAJOR, "ip2"); out: Loading
drivers/char/istallion.c +5 −5 Original line number Diff line number Diff line Loading @@ -792,7 +792,7 @@ static int stli_timeron; /*****************************************************************************/ static struct class_simple *istallion_class; static struct class *istallion_class; #ifdef MODULE Loading Loading @@ -854,10 +854,10 @@ static void __exit istallion_module_exit(void) put_tty_driver(stli_serial); for (i = 0; i < 4; i++) { devfs_remove("staliomem/%d", i); class_simple_device_remove(MKDEV(STL_SIOMEMMAJOR, i)); class_device_destroy(istallion_class, MKDEV(STL_SIOMEMMAJOR, i)); } devfs_remove("staliomem"); class_simple_destroy(istallion_class); class_destroy(istallion_class); if ((i = unregister_chrdev(STL_SIOMEMMAJOR, "staliomem"))) printk("STALLION: failed to un-register serial memory device, " "errno=%d\n", -i); Loading Loading @@ -5242,12 +5242,12 @@ int __init stli_init(void) "device\n"); devfs_mk_dir("staliomem"); istallion_class = class_simple_create(THIS_MODULE, "staliomem"); istallion_class = class_create(THIS_MODULE, "staliomem"); for (i = 0; i < 4; i++) { devfs_mk_cdev(MKDEV(STL_SIOMEMMAJOR, i), S_IFCHR | S_IRUSR | S_IWUSR, "staliomem/%d", i); class_simple_device_add(istallion_class, MKDEV(STL_SIOMEMMAJOR, i), class_device_create(istallion_class, MKDEV(STL_SIOMEMMAJOR, i), NULL, "staliomem%d", i); } Loading
drivers/char/lp.c +6 −6 Original line number Diff line number Diff line Loading @@ -146,7 +146,7 @@ static struct lp_struct lp_table[LP_NO]; static unsigned int lp_count = 0; static struct class_simple *lp_class; static struct class *lp_class; #ifdef CONFIG_LP_CONSOLE static struct parport *console_registered; // initially NULL Loading Loading @@ -804,7 +804,7 @@ static int lp_register(int nr, struct parport *port) if (reset) lp_reset(nr); class_simple_device_add(lp_class, MKDEV(LP_MAJOR, nr), NULL, class_device_create(lp_class, MKDEV(LP_MAJOR, nr), NULL, "lp%d", nr); devfs_mk_cdev(MKDEV(LP_MAJOR, nr), S_IFCHR | S_IRUGO | S_IWUGO, "printers/%d", nr); Loading Loading @@ -907,7 +907,7 @@ static int __init lp_init (void) } devfs_mk_dir("printers"); lp_class = class_simple_create(THIS_MODULE, "printer"); lp_class = class_create(THIS_MODULE, "printer"); if (IS_ERR(lp_class)) { err = PTR_ERR(lp_class); goto out_devfs; Loading @@ -930,7 +930,7 @@ static int __init lp_init (void) return 0; out_class: class_simple_destroy(lp_class); class_destroy(lp_class); out_devfs: devfs_remove("printers"); unregister_chrdev(LP_MAJOR, "lp"); Loading Loading @@ -981,10 +981,10 @@ static void lp_cleanup_module (void) continue; parport_unregister_device(lp_table[offset].dev); devfs_remove("printers/%d", offset); class_simple_device_remove(MKDEV(LP_MAJOR, offset)); class_device_destroy(lp_class, MKDEV(LP_MAJOR, offset)); } devfs_remove("printers"); class_simple_destroy(lp_class); class_destroy(lp_class); } __setup("lp=", lp_setup); Loading