--- zzzz-none-000/linux-2.6.19.2/drivers/pcmcia/ds.c 2007-01-10 19:10:37.000000000 +0000 +++ davinci-8020-5504/linux-2.6.19.2/drivers/pcmcia/ds.c 2007-01-11 07:38:19.000000000 +0000 @@ -717,7 +717,6 @@ static void pcmcia_bus_rescan(struct pcmcia_socket *skt) { int no_devices=0; - int ret = 0; unsigned long flags; /* must be called with skt_mutex held */ @@ -730,7 +729,7 @@ * missing resource information or other trouble, we need to * do this now. */ if (no_devices) { - ret = pcmcia_card_add(skt); + int ret = pcmcia_card_add(skt); if (ret) return; } @@ -742,9 +741,7 @@ /* we re-scan all devices, not just the ones connected to this * socket. This does not matter, though. */ - ret = bus_rescan_devices(&pcmcia_bus_type); - if (ret) - printk(KERN_INFO "pcmcia: bus_rescan_devices failed\n"); + bus_rescan_devices(&pcmcia_bus_type); } static inline int pcmcia_devmatch(struct pcmcia_device *dev, @@ -1004,7 +1001,6 @@ struct device_attribute *attr, const char *buf, size_t count) { struct pcmcia_device *p_dev = to_pcmcia_dev(dev); - int ret; if (!count) return -EINVAL; @@ -1013,10 +1009,7 @@ p_dev->allow_func_id_match = 1; mutex_unlock(&p_dev->socket->skt_mutex); - ret = bus_rescan_devices(&pcmcia_bus_type); - if (ret) - printk(KERN_INFO "pcmcia: bus_rescan_devices failed after " - "allowing func_id matches\n"); + bus_rescan_devices(&pcmcia_bus_type); return count; } @@ -1271,11 +1264,6 @@ socket->pcmcia_state.dead = 1; pccard_register_pcmcia(socket, NULL); - /* unregister any unbound devices */ - mutex_lock(&socket->skt_mutex); - pcmcia_card_remove(socket, NULL); - mutex_unlock(&socket->skt_mutex); - pcmcia_put_socket(socket); return; @@ -1304,22 +1292,10 @@ static int __init init_pcmcia_bus(void) { - int ret; - spin_lock_init(&pcmcia_dev_list_lock); - ret = bus_register(&pcmcia_bus_type); - if (ret < 0) { - printk(KERN_WARNING "pcmcia: bus_register error: %d\n", ret); - return ret; - } - ret = class_interface_register(&pcmcia_bus_interface); - if (ret < 0) { - printk(KERN_WARNING - "pcmcia: class_interface_register error: %d\n", ret); - bus_unregister(&pcmcia_bus_type); - return ret; - } + bus_register(&pcmcia_bus_type); + class_interface_register(&pcmcia_bus_interface); pcmcia_setup_ioctl();