aboutsummaryrefslogtreecommitdiffstats
path: root/drivers
diff options
context:
space:
mode:
Diffstat (limited to 'drivers')
-rw-r--r--drivers/char/ip2/ip2main.c4
-rw-r--r--drivers/char/mbcs.c7
-rw-r--r--drivers/char/stallion.c5
-rw-r--r--drivers/char/viotape.c7
-rw-r--r--drivers/net/ppp_generic.c3
5 files changed, 5 insertions, 21 deletions
diff --git a/drivers/char/ip2/ip2main.c b/drivers/char/ip2/ip2main.c
index 83c7258d3580..6005b5225772 100644
--- a/drivers/char/ip2/ip2main.c
+++ b/drivers/char/ip2/ip2main.c
@@ -425,9 +425,7 @@ cleanup_module(void)
425 printk(KERN_ERR "IP2: failed to unregister tty driver (%d)\n", err); 425 printk(KERN_ERR "IP2: failed to unregister tty driver (%d)\n", err);
426 } 426 }
427 put_tty_driver(ip2_tty_driver); 427 put_tty_driver(ip2_tty_driver);
428 if ( ( err = unregister_chrdev ( IP2_IPL_MAJOR, pcIpl ) ) ) { 428 unregister_chrdev(IP2_IPL_MAJOR, pcIpl);
429 printk(KERN_ERR "IP2: failed to unregister IPL driver (%d)\n", err);
430 }
431 remove_proc_entry("ip2mem", &proc_root); 429 remove_proc_entry("ip2mem", &proc_root);
432 430
433 // free memory 431 // free memory
diff --git a/drivers/char/mbcs.c b/drivers/char/mbcs.c
index 57f9115a456c..3daf5e0a27e1 100644
--- a/drivers/char/mbcs.c
+++ b/drivers/char/mbcs.c
@@ -816,12 +816,7 @@ struct cx_drv mbcs_driver = {
816 816
817static void __exit mbcs_exit(void) 817static void __exit mbcs_exit(void)
818{ 818{
819 int rv; 819 unregister_chrdev(mbcs_major, DEVICE_NAME);
820
821 rv = unregister_chrdev(mbcs_major, DEVICE_NAME);
822 if (rv < 0)
823 DBG(KERN_ALERT "Error in unregister_chrdev: %d\n", rv);
824
825 cx_driver_unregister(&mbcs_driver); 820 cx_driver_unregister(&mbcs_driver);
826} 821}
827 822
diff --git a/drivers/char/stallion.c b/drivers/char/stallion.c
index 93d0bb8b4c0f..4a80b2f864e0 100644
--- a/drivers/char/stallion.c
+++ b/drivers/char/stallion.c
@@ -4795,7 +4795,6 @@ static void __exit stallion_module_exit(void)
4795{ 4795{
4796 struct stlbrd *brdp; 4796 struct stlbrd *brdp;
4797 unsigned int i, j; 4797 unsigned int i, j;
4798 int retval;
4799 4798
4800 pr_debug("cleanup_module()\n"); 4799 pr_debug("cleanup_module()\n");
4801 4800
@@ -4818,9 +4817,7 @@ static void __exit stallion_module_exit(void)
4818 4817
4819 for (i = 0; i < 4; i++) 4818 for (i = 0; i < 4; i++)
4820 class_device_destroy(stallion_class, MKDEV(STL_SIOMEMMAJOR, i)); 4819 class_device_destroy(stallion_class, MKDEV(STL_SIOMEMMAJOR, i));
4821 if ((retval = unregister_chrdev(STL_SIOMEMMAJOR, "staliomem"))) 4820 unregister_chrdev(STL_SIOMEMMAJOR, "staliomem");
4822 printk("STALLION: failed to un-register serial memory device, "
4823 "errno=%d\n", -retval);
4824 class_destroy(stallion_class); 4821 class_destroy(stallion_class);
4825 4822
4826 pci_unregister_driver(&stl_pcidriver); 4823 pci_unregister_driver(&stl_pcidriver);
diff --git a/drivers/char/viotape.c b/drivers/char/viotape.c
index db57277117bb..e12275df6ea2 100644
--- a/drivers/char/viotape.c
+++ b/drivers/char/viotape.c
@@ -1098,15 +1098,10 @@ static int chg_state(int index, unsigned char new_state, struct file *file)
1098/* Cleanup */ 1098/* Cleanup */
1099static void __exit viotap_exit(void) 1099static void __exit viotap_exit(void)
1100{ 1100{
1101 int ret;
1102
1103 remove_proc_entry("iSeries/viotape", NULL); 1101 remove_proc_entry("iSeries/viotape", NULL);
1104 vio_unregister_driver(&viotape_driver); 1102 vio_unregister_driver(&viotape_driver);
1105 class_destroy(tape_class); 1103 class_destroy(tape_class);
1106 ret = unregister_chrdev(VIOTAPE_MAJOR, "viotape"); 1104 unregister_chrdev(VIOTAPE_MAJOR, "viotape");
1107 if (ret < 0)
1108 printk(VIOTAPE_KERN_WARN "Error unregistering device: %d\n",
1109 ret);
1110 if (viotape_unitinfo) 1105 if (viotape_unitinfo)
1111 dma_free_coherent(iSeries_vio_dev, 1106 dma_free_coherent(iSeries_vio_dev,
1112 sizeof(viotape_unitinfo[0]) * VIOTAPE_MAX_TAPE, 1107 sizeof(viotape_unitinfo[0]) * VIOTAPE_MAX_TAPE,
diff --git a/drivers/net/ppp_generic.c b/drivers/net/ppp_generic.c
index 3ef0092dc09c..ef3325b69233 100644
--- a/drivers/net/ppp_generic.c
+++ b/drivers/net/ppp_generic.c
@@ -2684,8 +2684,7 @@ static void __exit ppp_cleanup(void)
2684 if (atomic_read(&ppp_unit_count) || atomic_read(&channel_count)) 2684 if (atomic_read(&ppp_unit_count) || atomic_read(&channel_count))
2685 printk(KERN_ERR "PPP: removing module but units remain!\n"); 2685 printk(KERN_ERR "PPP: removing module but units remain!\n");
2686 cardmap_destroy(&all_ppp_units); 2686 cardmap_destroy(&all_ppp_units);
2687 if (unregister_chrdev(PPP_MAJOR, "ppp") != 0) 2687 unregister_chrdev(PPP_MAJOR, "ppp");
2688 printk(KERN_ERR "PPP: failed to unregister PPP device\n");
2689 device_destroy(ppp_class, MKDEV(PPP_MAJOR, 0)); 2688 device_destroy(ppp_class, MKDEV(PPP_MAJOR, 0));
2690 class_destroy(ppp_class); 2689 class_destroy(ppp_class);
2691} 2690}