aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/pcmcia/cs.c
diff options
context:
space:
mode:
authorDavid Brownell <dbrownell@users.sourceforge.net>2008-04-28 04:03:20 -0400
committerGreg Kroah-Hartman <gregkh@suse.de>2008-04-30 19:52:48 -0400
commit4356d73d028ad0726cfaf31ad30c5d28fcd98795 (patch)
tree4ca02a5ac47e6da7857c6a0caf93d06c9916f96c /drivers/pcmcia/cs.c
parent4f452e8aa492c0b8028ca9b4bdb4d018ba28c6c7 (diff)
pcmcia: remove pccard_sysfs_interface warnings
Make the PCMCIA core stop using class_interface to hide socket attribute registration. This removes the associated section mismatch warnings, and helps get to the point where that mechanism can finally be removed. Simplify that attribute registration by using an attribute_group. This is a net shrink in object size. Signed-off-by: David Brownell <dbrownell@users.sourceforge.net> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
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