diff options
author | Dominik Brodowski <linux@dominikbrodowski.net> | 2005-06-27 23:28:17 (GMT) |
---|---|---|
committer | Linus Torvalds <torvalds@ppc970.osdl.org> | 2005-06-28 01:03:08 (GMT) |
commit | e2f0b5344161dabfab102ac0a54f330f61477972 (patch) | |
tree | 74ecdbd6bd7e875c56f78a5a1d7822ade2159794 /drivers/pcmcia/socket_sysfs.c | |
parent | e94e15f70559962f60915a09d44658b73a453fe2 (diff) | |
download | linux-fsl-qoriq-e2f0b5344161dabfab102ac0a54f330f61477972.tar.xz |
[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 8e66eef..fcef54c 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); } } |