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/usb/host | |
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/usb/host')
-rw-r--r-- | drivers/usb/host/sl811_cs.c | 11 |
1 files changed, 4 insertions, 7 deletions
diff --git a/drivers/usb/host/sl811_cs.c b/drivers/usb/host/sl811_cs.c index c6f1baf541ab..8e61faa120fc 100644 --- a/drivers/usb/host/sl811_cs.c +++ b/drivers/usb/host/sl811_cs.c | |||
@@ -67,7 +67,7 @@ module_param(pc_debug, int, 0644); | |||
67 | static const char driver_name[DEV_NAME_LEN] = "sl811_cs"; | 67 | static const char driver_name[DEV_NAME_LEN] = "sl811_cs"; |
68 | 68 | ||
69 | typedef struct local_info_t { | 69 | typedef struct local_info_t { |
70 | dev_link_t link; | 70 | struct pcmcia_device *p_dev; |
71 | dev_node_t node; | 71 | dev_node_t node; |
72 | } local_info_t; | 72 | } local_info_t; |
73 | 73 | ||
@@ -268,7 +268,7 @@ next_entry: | |||
268 | 268 | ||
269 | sprintf(dev->node.dev_name, driver_name); | 269 | sprintf(dev->node.dev_name, driver_name); |
270 | dev->node.major = dev->node.minor = 0; | 270 | dev->node.major = dev->node.minor = 0; |
271 | link->dev = &dev->node; | 271 | link->dev_node = &dev->node; |
272 | 272 | ||
273 | printk(KERN_INFO "%s: index 0x%02x: ", | 273 | printk(KERN_INFO "%s: index 0x%02x: ", |
274 | dev->node.dev_name, link->conf.ConfigIndex); | 274 | dev->node.dev_name, link->conf.ConfigIndex); |
@@ -294,13 +294,13 @@ cs_failed: | |||
294 | static int sl811_cs_attach(struct pcmcia_device *p_dev) | 294 | static int sl811_cs_attach(struct pcmcia_device *p_dev) |
295 | { | 295 | { |
296 | local_info_t *local; | 296 | local_info_t *local; |
297 | dev_link_t *link; | 297 | dev_link_t *link = dev_to_instance(p_dev); |
298 | 298 | ||
299 | local = kmalloc(sizeof(local_info_t), GFP_KERNEL); | 299 | local = kmalloc(sizeof(local_info_t), GFP_KERNEL); |
300 | if (!local) | 300 | if (!local) |
301 | return -ENOMEM; | 301 | return -ENOMEM; |
302 | memset(local, 0, sizeof(local_info_t)); | 302 | memset(local, 0, sizeof(local_info_t)); |
303 | link = &local->link; | 303 | local->p_dev = p_dev; |
304 | link->priv = local; | 304 | link->priv = local; |
305 | 305 | ||
306 | /* Initialize */ | 306 | /* Initialize */ |
@@ -311,9 +311,6 @@ static int sl811_cs_attach(struct pcmcia_device *p_dev) | |||
311 | link->conf.Attributes = 0; | 311 | link->conf.Attributes = 0; |
312 | link->conf.IntType = INT_MEMORY_AND_IO; | 312 | link->conf.IntType = INT_MEMORY_AND_IO; |
313 | 313 | ||
314 | link->handle = p_dev; | ||
315 | p_dev->instance = link; | ||
316 | |||
317 | link->state |= DEV_PRESENT | DEV_CONFIG_PENDING; | 314 | link->state |= DEV_PRESENT | DEV_CONFIG_PENDING; |
318 | sl811_cs_config(link); | 315 | sl811_cs_config(link); |
319 | 316 | ||