diff options
author | Dominik Brodowski <linux@dominikbrodowski.net> | 2005-06-27 16:28:17 -0700 |
---|---|---|
committer | Linus Torvalds <torvalds@ppc970.osdl.org> | 2005-06-27 18:03:08 -0700 |
commit | e2f0b5344161dabfab102ac0a54f330f61477972 (patch) | |
tree | 74ecdbd6bd7e875c56f78a5a1d7822ade2159794 /drivers/pcmcia/socket_sysfs.c | |
parent | e94e15f70559962f60915a09d44658b73a453fe2 (diff) | |
download | linux-e2f0b5344161dabfab102ac0a54f330f61477972.tar.bz2 |
[PATCH] pcmcia: rescan bus always upon echoing into setup_done
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@dominikbrodowski.net>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Diffstat (limited to 'drivers/pcmcia/socket_sysfs.c')
-rw-r--r-- | drivers/pcmcia/socket_sysfs.c | 26 |
1 files changed, 11 insertions, 15 deletions
diff --git a/drivers/pcmcia/socket_sysfs.c b/drivers/pcmcia/socket_sysfs.c index 8e66eeff672e..fcef54c1c2da 100644 --- a/drivers/pcmcia/socket_sysfs.c +++ b/drivers/pcmcia/socket_sysfs.c @@ -163,24 +163,20 @@ static ssize_t pccard_store_resource(struct class_device *dev, const char *buf, return -EINVAL; spin_lock_irqsave(&s->lock, flags); - if (!s->resource_setup_done) { + if (!s->resource_setup_done) s->resource_setup_done = 1; - spin_unlock_irqrestore(&s->lock, flags); + 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->requery(s); + module_put(s->callback->owner); } - up(&s->skt_sem); - - return count; } - spin_unlock_irqrestore(&s->lock, flags); + up(&s->skt_sem); return count; } @@ -315,7 +311,7 @@ static ssize_t pccard_store_cis(struct kobject *kobj, char *buf, loff_t off, siz if ((s->callback) && (s->state & SOCKET_PRESENT) && !(s->state & SOCKET_CARDBUS)) { if (try_module_get(s->callback->owner)) { - s->callback->replace_cis(); + s->callback->requery(s); module_put(s->callback->owner); } } |