diff options
author | Dominik Brodowski <linux@dominikbrodowski.net> | 2005-06-27 19:28:17 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@ppc970.osdl.org> | 2005-06-27 21:03:08 -0400 |
commit | e2f0b5344161dabfab102ac0a54f330f61477972 (patch) | |
tree | 74ecdbd6bd7e875c56f78a5a1d7822ade2159794 /drivers/pcmcia/socket_sysfs.c | |
parent | e94e15f70559962f60915a09d44658b73a453fe2 (diff) |
[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, | |||
163 | return -EINVAL; | 163 | return -EINVAL; |
164 | 164 | ||
165 | spin_lock_irqsave(&s->lock, flags); | 165 | spin_lock_irqsave(&s->lock, flags); |
166 | if (!s->resource_setup_done) { | 166 | if (!s->resource_setup_done) |
167 | s->resource_setup_done = 1; | 167 | s->resource_setup_done = 1; |
168 | spin_unlock_irqrestore(&s->lock, flags); | 168 | spin_unlock_irqrestore(&s->lock, flags); |
169 | 169 | ||
170 | down(&s->skt_sem); | 170 | down(&s->skt_sem); |
171 | if ((s->callback) && | 171 | if ((s->callback) && |
172 | (s->state & SOCKET_PRESENT) && | 172 | (s->state & SOCKET_PRESENT) && |
173 | !(s->state & SOCKET_CARDBUS)) { | 173 | !(s->state & SOCKET_CARDBUS)) { |
174 | if (try_module_get(s->callback->owner)) { | 174 | if (try_module_get(s->callback->owner)) { |
175 | s->callback->resources_done(s); | 175 | s->callback->requery(s); |
176 | module_put(s->callback->owner); | 176 | module_put(s->callback->owner); |
177 | } | ||
178 | } | 177 | } |
179 | up(&s->skt_sem); | ||
180 | |||
181 | return count; | ||
182 | } | 178 | } |
183 | spin_unlock_irqrestore(&s->lock, flags); | 179 | up(&s->skt_sem); |
184 | 180 | ||
185 | return count; | 181 | return count; |
186 | } | 182 | } |
@@ -315,7 +311,7 @@ static ssize_t pccard_store_cis(struct kobject *kobj, char *buf, loff_t off, siz | |||
315 | if ((s->callback) && (s->state & SOCKET_PRESENT) && | 311 | if ((s->callback) && (s->state & SOCKET_PRESENT) && |
316 | !(s->state & SOCKET_CARDBUS)) { | 312 | !(s->state & SOCKET_CARDBUS)) { |
317 | if (try_module_get(s->callback->owner)) { | 313 | if (try_module_get(s->callback->owner)) { |
318 | s->callback->replace_cis(); | 314 | s->callback->requery(s); |
319 | module_put(s->callback->owner); | 315 | module_put(s->callback->owner); |
320 | } | 316 | } |
321 | } | 317 | } |