[PATCH 14/14] pcmcia: rescan bus always upon echoing into setup_done
Dominik Brodowski
linux at dominikbrodowski.net
Sun Feb 27 05:11:55 EST 2005
Always rescan the devices upon echo'ing something to
available_resources_setup_done. This is needed for proper
"coldplug" support.
Signed-off-by: Dominik Brodowski <linux at dominikbrodowski.net>
Index: 2.6.11-rc5/drivers/pcmcia/socket_sysfs.c
===================================================================
--- 2.6.11-rc5.orig/drivers/pcmcia/socket_sysfs.c 2005-02-27 08:54:46.000000000 +0100
+++ 2.6.11-rc5/drivers/pcmcia/socket_sysfs.c 2005-02-27 08:56:03.000000000 +0100
@@ -163,24 +163,19 @@
return -EINVAL;
spin_lock_irqsave(&s->lock, flags);
- if (!s->resource_setup_done) {
- s->resource_setup_done = 1;
- spin_unlock_irqrestore(&s->lock, flags);
+ s->resource_setup_done = 1;
+ spin_unlock_irqrestore(&s->lock, flags);
- down(&s->skt_sem);
- if ((s->callback) &&
- (s->state & SOCKET_PRESENT) &&
- !(s->state & SOCKET_CARDBUS)) {
- if (try_module_get(s->callback->owner)) {
- s->callback->resources_done(s);
- module_put(s->callback->owner);
- }
+ down(&s->skt_sem);
+ if ((s->callback) &&
+ (s->state & SOCKET_PRESENT) &&
+ !(s->state & SOCKET_CARDBUS)) {
+ if (try_module_get(s->callback->owner)) {
+ s->callback->resources_done(s);
+ module_put(s->callback->owner);
}
- up(&s->skt_sem);
-
- return count;
}
- spin_unlock_irqrestore(&s->lock, flags);
+ up(&s->skt_sem);
return count;
}
More information about the linux-pcmcia
mailing list