aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/pcmcia/ds.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/pcmcia/ds.c')
-rw-r--r--drivers/pcmcia/ds.c12
1 files changed, 7 insertions, 5 deletions
diff --git a/drivers/pcmcia/ds.c b/drivers/pcmcia/ds.c
index 80b34b65511c..54068f451ee6 100644
--- a/drivers/pcmcia/ds.c
+++ b/drivers/pcmcia/ds.c
@@ -1167,6 +1167,12 @@ int pcmcia_deregister_client(client_handle_t handle)
1167} /* deregister_client */ 1167} /* deregister_client */
1168EXPORT_SYMBOL(pcmcia_deregister_client); 1168EXPORT_SYMBOL(pcmcia_deregister_client);
1169 1169
1170static struct pcmcia_callback pcmcia_bus_callback = {
1171 .owner = THIS_MODULE,
1172 .event = ds_event,
1173 .requery = pcmcia_bus_rescan,
1174};
1175
1170static int __devinit pcmcia_bus_add_socket(struct class_device *class_dev) 1176static int __devinit pcmcia_bus_add_socket(struct class_device *class_dev)
1171{ 1177{
1172 struct pcmcia_socket *socket = class_get_devdata(class_dev); 1178 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)
1201 INIT_WORK(&s->device_add, pcmcia_delayed_add_pseudo_device, s); 1207 INIT_WORK(&s->device_add, pcmcia_delayed_add_pseudo_device, s);
1202 1208
1203 /* Set up hotline to Card Services */ 1209 /* Set up hotline to Card Services */
1204 s->callback.owner = THIS_MODULE;
1205 s->callback.event = &ds_event;
1206 s->callback.requery = &pcmcia_bus_rescan;
1207 socket->pcmcia = s; 1210 socket->pcmcia = s;
1208 1211
1209 ret = pccard_register_pcmcia(socket, &s->callback); 1212 ret = pccard_register_pcmcia(socket, &pcmcia_bus_callback);
1210 if (ret) { 1213 if (ret) {
1211 printk(KERN_ERR "PCMCIA registration PCCard core failed for socket %p\n", socket); 1214 printk(KERN_ERR "PCMCIA registration PCCard core failed for socket %p\n", socket);
1212 pcmcia_put_bus_socket(s); 1215 pcmcia_put_bus_socket(s);
@@ -1217,7 +1220,6 @@ static int __devinit pcmcia_bus_add_socket(struct class_device *class_dev)
1217 return 0; 1220 return 0;
1218} 1221}
1219 1222
1220
1221static void pcmcia_bus_remove_socket(struct class_device *class_dev) 1223static void pcmcia_bus_remove_socket(struct class_device *class_dev)
1222{ 1224{
1223 struct pcmcia_socket *socket = class_get_devdata(class_dev); 1225 struct pcmcia_socket *socket = class_get_devdata(class_dev);