diff options
author | Dominik Brodowski <linux@dominikbrodowski.net> | 2006-03-05 04:45:09 -0500 |
---|---|---|
committer | Dominik Brodowski <linux@dominikbrodowski.net> | 2006-03-31 10:15:57 -0500 |
commit | fd238232cd0ff4840ae6946bb338502154096d88 (patch) | |
tree | d20e8f5871f7cff9d0867a84f6ba088fbffcbe28 /drivers/pcmcia/pcmcia_ioctl.c | |
parent | a78f4dd331a4f6a396eb5849656a4a72a70a56d7 (diff) |
[PATCH] pcmcia: embed dev_link_t into struct pcmcia_device
Embed dev_link_t into struct pcmcia_device(), as they basically address the
same entity. The actual contents of dev_link_t will be cleaned up step by step.
This patch includes a bugfix from and signed-off-by Andrew Morton.
Signed-off-by: Dominik Brodowski <linux@dominikbrodowski.net>
Diffstat (limited to 'drivers/pcmcia/pcmcia_ioctl.c')
-rw-r--r-- | drivers/pcmcia/pcmcia_ioctl.c | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/drivers/pcmcia/pcmcia_ioctl.c b/drivers/pcmcia/pcmcia_ioctl.c index be08bc9e99fd..2b11a332175e 100644 --- a/drivers/pcmcia/pcmcia_ioctl.c +++ b/drivers/pcmcia/pcmcia_ioctl.c | |||
@@ -229,7 +229,7 @@ static int bind_request(struct pcmcia_socket *s, bind_info_t *bind_info) | |||
229 | * by userspace before, we need to | 229 | * by userspace before, we need to |
230 | * return the "instance". */ | 230 | * return the "instance". */ |
231 | spin_unlock_irqrestore(&pcmcia_dev_list_lock, flags); | 231 | spin_unlock_irqrestore(&pcmcia_dev_list_lock, flags); |
232 | bind_info->instance = p_dev->instance; | 232 | bind_info->instance = p_dev; |
233 | ret = -EBUSY; | 233 | ret = -EBUSY; |
234 | goto err_put_module; | 234 | goto err_put_module; |
235 | } else { | 235 | } else { |
@@ -358,16 +358,15 @@ static int get_device_info(struct pcmcia_socket *s, bind_info_t *bind_info, int | |||
358 | found: | 358 | found: |
359 | spin_unlock_irqrestore(&pcmcia_dev_list_lock, flags); | 359 | spin_unlock_irqrestore(&pcmcia_dev_list_lock, flags); |
360 | 360 | ||
361 | if ((!p_dev->instance) || | 361 | if (p_dev->state & DEV_CONFIG_PENDING) { |
362 | (p_dev->instance->state & DEV_CONFIG_PENDING)) { | ||
363 | ret = -EAGAIN; | 362 | ret = -EAGAIN; |
364 | goto err_put; | 363 | goto err_put; |
365 | } | 364 | } |
366 | 365 | ||
367 | if (first) | 366 | if (first) |
368 | node = p_dev->instance->dev; | 367 | node = p_dev->dev_node; |
369 | else | 368 | else |
370 | for (node = p_dev->instance->dev; node; node = node->next) | 369 | for (node = p_dev->dev_node; node; node = node->next) |
371 | if (node == bind_info->next) | 370 | if (node == bind_info->next) |
372 | break; | 371 | break; |
373 | if (!node) { | 372 | if (!node) { |