[PATCH] pcmcia: CIS overrid via sysfs
The one thing which surprises me in this patch that cis->Length needs to be
set to count+1. Without it, it doesn't work, but with it, it doesn't make
sense to me.
Signed-off-by: Dominik Brodowski <linux@dominikbrodowski.net>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
diff --git a/drivers/pcmcia/ds.c b/drivers/pcmcia/ds.c
index c0611d5..f657a2a 100644
--- a/drivers/pcmcia/ds.c
+++ b/drivers/pcmcia/ds.c
@@ -653,6 +653,11 @@
return;
}
+static void pcmcia_bus_rescan(void)
+{
+ /* must be called with skt_sem held */
+ bus_rescan_devices(&pcmcia_bus_type);
+}
static inline int pcmcia_devmatch(struct pcmcia_device *dev,
struct pcmcia_device_id *did)
@@ -1766,6 +1771,7 @@
s->callback.owner = THIS_MODULE;
s->callback.event = &ds_event;
s->callback.resources_done = &pcmcia_card_add;
+ s->callback.replace_cis = &pcmcia_bus_rescan;
socket->pcmcia = s;
ret = pccard_register_pcmcia(socket, &s->callback);