Remove the dev_info - contained name from struct client_t drivers/pcmcia/cs.c | 3 ++- drivers/pcmcia/ds.c | 27 ++++++++++++++++++--------- include/pcmcia/ds.h | 1 - 3 files changed, 20 insertions(+), 11 deletions(-) diff -ruN linux-original/drivers/pcmcia/cs.c linux/drivers/pcmcia/cs.c --- linux-original/drivers/pcmcia/cs.c 2004-11-06 17:09:16.607080224 +0100 +++ linux/drivers/pcmcia/cs.c 2004-11-06 17:08:55.647266600 +0100 @@ -1530,6 +1530,7 @@ struct pcmcia_socket *s; config_t *c; int ret = CS_IN_USE, irq = 0; + struct pcmcia_device *p_dev = handle_to_pdev(handle); if (CHECK_HANDLE(handle)) return CS_BAD_HANDLE; @@ -1579,7 +1580,7 @@ ((req->Attributes & IRQ_TYPE_DYNAMIC_SHARING) || (s->functions > 1) || (irq == s->pci_irq)) ? SA_SHIRQ : 0, - handle->dev_info, req->Instance)) + p_dev->dev.bus_id, req->Instance)) return CS_IN_USE; } diff -ruN linux-original/drivers/pcmcia/ds.c linux/drivers/pcmcia/ds.c --- linux-original/drivers/pcmcia/ds.c 2004-11-06 16:46:18.625565256 +0100 +++ linux/drivers/pcmcia/ds.c 2004-11-06 17:08:55.649266296 +0100 @@ -220,8 +220,10 @@ if (CHECK_HANDLE(handle)) printk(KERN_NOTICE); - else - printk(KERN_NOTICE "%s: ", handle->dev_info); + else { + struct pcmcia_device *p_dev = handle_to_pdev(handle); + printk(KERN_NOTICE "%s: ", p_dev->dev.bus_id); + } for (i = 0; i < ARRAY_SIZE(service_table); i++) if (service_table[i].key == err->func) @@ -600,7 +602,6 @@ p_dev->client.Socket = s->parent; p_dev->client.Function = bind_info->function; p_dev->client.state = CLIENT_UNBOUND; - strlcpy(p_dev->client.dev_info, p_drv->drv.name, DEV_NAME_LEN); ret = device_register(&p_dev->dev); if (ret) { @@ -677,14 +678,22 @@ continue; spin_lock_irqsave(&pcmcia_dev_list_lock, flags); list_for_each_entry(p_dev, &skt->devices_list, socket_device_list) { - if ((p_dev->client.state & CLIENT_UNBOUND) && - (!strcmp(p_dev->client.dev_info, (char *)req->dev_info))) { - p_dev = get_p_dev(p_dev); - if (p_dev) - client = &p_dev->client; + struct pcmcia_driver *p_drv; + p_dev = get_p_dev(p_dev); + if (!p_dev) + continue; + if ((!p_dev->client.state & CLIENT_UNBOUND) || + (!p_dev->dev.driver)) { + put_p_dev(p_dev); + continue; + } + p_drv = to_pcmcia_drv(p_dev->dev.driver); + if (!strncmp(p_drv->drv.name, (char *)req->dev_info, DEV_NAME_LEN)) { + client = &p_dev->client; spin_unlock_irqrestore(&pcmcia_dev_list_lock, flags); goto found; } + put_p_dev(p_dev); } spin_unlock_irqrestore(&pcmcia_dev_list_lock, flags); pcmcia_put_bus_socket(skt); @@ -727,7 +736,7 @@ } ds_dbg(1, "register_client(): client 0x%p, dev %s\n", - client, client->dev_info); + client, p_dev->dev.bus_id); if (client->EventMask & CS_EVENT_REGISTRATION_COMPLETE) EVENT(client, CS_EVENT_REGISTRATION_COMPLETE, CS_EVENT_PRI_LOW); diff -ruN linux-original/include/pcmcia/ds.h linux/include/pcmcia/ds.h --- linux-original/include/pcmcia/ds.h 2004-11-06 16:42:49.966286288 +0100 +++ linux/include/pcmcia/ds.h 2004-11-06 17:08:55.649266296 +0100 @@ -157,7 +157,6 @@ u_short client_magic; struct pcmcia_socket *Socket; u_char Function; - dev_info_t dev_info; u_int state; event_t EventMask; int (*event_handler) (event_t event, int priority,