diff options
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 | } |