aboutsummaryrefslogtreecommitdiff
path: root/drivers
diff options
context:
space:
mode:
authorDominik Brodowski <linux@dominikbrodowski.net>2005-06-27 16:28:49 -0700
committerLinus Torvalds <torvalds@ppc970.osdl.org>2005-06-27 18:03:19 -0700
commit90c6cdd1fa8dd4d69af792541a37b38576aa9b5a (patch)
treef8294e94811eb9cf6c121a65c4afbce485d7d6f6 /drivers
parente7a480d229461e54a0b3b0439b2bf0e652545e3d (diff)
[PATCH] pcmcia: clean up cs ds callback
struct pcmcia_callback isn't needed for each socket, one is enough for all sockets. Signed-off-by: Dominik Brodowski <linux@dominikbrodowski.net> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Diffstat (limited to 'drivers')
-rw-r--r--drivers/pcmcia/ds.c12
-rw-r--r--drivers/pcmcia/ds_internal.h1
2 files changed, 7 insertions, 6 deletions
diff --git a/drivers/pcmcia/ds.c b/drivers/pcmcia/ds.c
index 80b34b65511..54068f451ee 100644
--- a/drivers/pcmcia/ds.c
+++ b/drivers/pcmcia/ds.c
@@ -1167,6 +1167,12 @@ int pcmcia_deregister_client(client_handle_t handle)
} /* deregister_client */
EXPORT_SYMBOL(pcmcia_deregister_client);
+static struct pcmcia_callback pcmcia_bus_callback = {
+ .owner = THIS_MODULE,
+ .event = ds_event,
+ .requery = pcmcia_bus_rescan,
+};
+
static int __devinit pcmcia_bus_add_socket(struct class_device *class_dev)
{
struct pcmcia_socket *socket = class_get_devdata(class_dev);
@@ -1201,12 +1207,9 @@ static int __devinit pcmcia_bus_add_socket(struct class_device *class_dev)
INIT_WORK(&s->device_add, pcmcia_delayed_add_pseudo_device, s);
/* Set up hotline to Card Services */
- s->callback.owner = THIS_MODULE;
- s->callback.event = &ds_event;
- s->callback.requery = &pcmcia_bus_rescan;
socket->pcmcia = s;
- ret = pccard_register_pcmcia(socket, &s->callback);
+ ret = pccard_register_pcmcia(socket, &pcmcia_bus_callback);
if (ret) {
printk(KERN_ERR "PCMCIA registration PCCard core failed for socket %p\n", socket);
pcmcia_put_bus_socket(s);
@@ -1217,7 +1220,6 @@ static int __devinit pcmcia_bus_add_socket(struct class_device *class_dev)
return 0;
}
-
static void pcmcia_bus_remove_socket(struct class_device *class_dev)
{
struct pcmcia_socket *socket = class_get_devdata(class_dev);
diff --git a/drivers/pcmcia/ds_internal.h b/drivers/pcmcia/ds_internal.h
index 0de90e5e67a..b05bc39d9cd 100644
--- a/drivers/pcmcia/ds_internal.h
+++ b/drivers/pcmcia/ds_internal.h
@@ -5,7 +5,6 @@ struct user_info_t;
/* Socket state information */
struct pcmcia_bus_socket {
struct kref refcount;
- struct pcmcia_callback callback;
int state;
struct pcmcia_socket *parent;