aboutsummaryrefslogtreecommitdiff
path: root/drivers/pcmcia/cs.c
diff options
context:
space:
mode:
authorDavid Brownell <dbrownell@users.sourceforge.net>2008-04-28 01:03:20 -0700
committerGreg Kroah-Hartman <gregkh@suse.de>2008-04-30 16:52:48 -0700
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 56230dbd347..29276bd2829 100644
--- a/drivers/pcmcia/cs.c
+++ b/drivers/pcmcia/cs.c
@@ -652,6 +652,9 @@ static int pccardd(void *__skt)
complete(&skt->thread_done);
return 0;
}
+ ret = pccard_sysfs_add_socket(&skt->dev);
+ if (ret)
+ dev_warn(&skt->dev, "err %d adding socket attributes\n", ret);
add_wait_queue(&skt->thread_wait, &wait);
complete(&skt->thread_done);
@@ -694,6 +697,7 @@ static int pccardd(void *__skt)
remove_wait_queue(&skt->thread_wait, &wait);
/* remove from the device core */
+ pccard_sysfs_remove_socket(&skt->dev);
device_unregister(&skt->dev);
return 0;
@@ -940,20 +944,13 @@ EXPORT_SYMBOL(pcmcia_socket_class);
static int __init init_pcmcia_cs(void)
{
- int ret;
-
init_completion(&pcmcia_unload);
- ret = class_register(&pcmcia_socket_class);
- if (ret)
- return (ret);
- return class_interface_register(&pccard_sysfs_interface);
+ return class_register(&pcmcia_socket_class);
}
static void __exit exit_pcmcia_cs(void)
{
- class_interface_unregister(&pccard_sysfs_interface);
class_unregister(&pcmcia_socket_class);
-
wait_for_completion(&pcmcia_unload);
}