diff options
Diffstat (limited to 'drivers/usb/host/sl811_cs.c')
-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 | ||