aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/pcmcia/cs.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/pcmcia/cs.c')
-rw-r--r--drivers/pcmcia/cs.c13
1 files changed, 5 insertions, 8 deletions
diff --git a/drivers/pcmcia/cs.c b/drivers/pcmcia/cs.c
index 56230dbd347a..29276bd28295 100644
--- a/drivers/pcmcia/cs.c
+++ b/drivers/pcmcia/cs.c
@@ -652,6 +652,9 @@ static int pccardd(void *__skt)
652 complete(&skt->thread_done); 652 complete(&skt->thread_done);
653 return 0; 653 return 0;
654 } 654 }
655 ret = pccard_sysfs_add_socket(&skt->dev);
656 if (ret)
657 dev_warn(&skt->dev, "err %d adding socket attributes\n", ret);
655 658
656 add_wait_queue(&skt->thread_wait, &wait); 659 add_wait_queue(&skt->thread_wait, &wait);
657 complete(&skt->thread_done); 660 complete(&skt->thread_done);
@@ -694,6 +697,7 @@ static int pccardd(void *__skt)
694 remove_wait_queue(&skt->thread_wait, &wait); 697 remove_wait_queue(&skt->thread_wait, &wait);
695 698
696 /* remove from the device core */ 699 /* remove from the device core */
700 pccard_sysfs_remove_socket(&skt->dev);
697 device_unregister(&skt->dev); 701 device_unregister(&skt->dev);
698 702
699 return 0; 703 return 0;
@@ -940,20 +944,13 @@ EXPORT_SYMBOL(pcmcia_socket_class);
940 944
941static int __init init_pcmcia_cs(void) 945static int __init init_pcmcia_cs(void)
942{ 946{
943 int ret;
944
945 init_completion(&pcmcia_unload); 947 init_completion(&pcmcia_unload);
946 ret = class_register(&pcmcia_socket_class); 948 return class_register(&pcmcia_socket_class);
947 if (ret)
948 return (ret);
949 return class_interface_register(&pccard_sysfs_interface);
950} 949}
951 950
952static void __exit exit_pcmcia_cs(void) 951static void __exit exit_pcmcia_cs(void)
953{ 952{
954 class_interface_unregister(&pccard_sysfs_interface);
955 class_unregister(&pcmcia_socket_class); 953 class_unregister(&pcmcia_socket_class);
956
957 wait_for_completion(&pcmcia_unload); 954 wait_for_completion(&pcmcia_unload);
958} 955}
959 956