diff options
Diffstat (limited to 'drivers/pcmcia')
-rw-r--r-- | drivers/pcmcia/cardbus.c | 2 | ||||
-rw-r--r-- | drivers/pcmcia/ds.c | 15 | ||||
-rw-r--r-- | drivers/pcmcia/pxa2xx_base.c | 12 | ||||
-rw-r--r-- | drivers/pcmcia/sa1111_generic.c | 3 |
4 files changed, 14 insertions, 18 deletions
diff --git a/drivers/pcmcia/cardbus.c b/drivers/pcmcia/cardbus.c index 9a58862f1401..6e75153c5b4f 100644 --- a/drivers/pcmcia/cardbus.c +++ b/drivers/pcmcia/cardbus.c | |||
@@ -108,5 +108,5 @@ void cb_free(struct pcmcia_socket *s) | |||
108 | struct pci_dev *bridge = s->cb_dev; | 108 | struct pci_dev *bridge = s->cb_dev; |
109 | 109 | ||
110 | if (bridge) | 110 | if (bridge) |
111 | pci_remove_behind_bridge(bridge); | 111 | pci_stop_and_remove_behind_bridge(bridge); |
112 | } | 112 | } |
diff --git a/drivers/pcmcia/ds.c b/drivers/pcmcia/ds.c index 749c2a16012c..079629bff957 100644 --- a/drivers/pcmcia/ds.c +++ b/drivers/pcmcia/ds.c | |||
@@ -127,10 +127,7 @@ pcmcia_store_new_id(struct device_driver *driver, const char *buf, size_t count) | |||
127 | list_add_tail(&dynid->node, &pdrv->dynids.list); | 127 | list_add_tail(&dynid->node, &pdrv->dynids.list); |
128 | mutex_unlock(&pdrv->dynids.lock); | 128 | mutex_unlock(&pdrv->dynids.lock); |
129 | 129 | ||
130 | if (get_driver(&pdrv->drv)) { | 130 | retval = driver_attach(&pdrv->drv); |
131 | retval = driver_attach(&pdrv->drv); | ||
132 | put_driver(&pdrv->drv); | ||
133 | } | ||
134 | 131 | ||
135 | if (retval) | 132 | if (retval) |
136 | return retval; | 133 | return retval; |
@@ -160,6 +157,11 @@ pcmcia_create_newid_file(struct pcmcia_driver *drv) | |||
160 | return error; | 157 | return error; |
161 | } | 158 | } |
162 | 159 | ||
160 | static void | ||
161 | pcmcia_remove_newid_file(struct pcmcia_driver *drv) | ||
162 | { | ||
163 | driver_remove_file(&drv->drv, &driver_attr_new_id); | ||
164 | } | ||
163 | 165 | ||
164 | /** | 166 | /** |
165 | * pcmcia_register_driver - register a PCMCIA driver with the bus core | 167 | * pcmcia_register_driver - register a PCMCIA driver with the bus core |
@@ -204,6 +206,7 @@ EXPORT_SYMBOL(pcmcia_register_driver); | |||
204 | void pcmcia_unregister_driver(struct pcmcia_driver *driver) | 206 | void pcmcia_unregister_driver(struct pcmcia_driver *driver) |
205 | { | 207 | { |
206 | pr_debug("unregistering driver %s\n", driver->name); | 208 | pr_debug("unregistering driver %s\n", driver->name); |
209 | pcmcia_remove_newid_file(driver); | ||
207 | driver_unregister(&driver->drv); | 210 | driver_unregister(&driver->drv); |
208 | pcmcia_free_dynids(driver); | 211 | pcmcia_free_dynids(driver); |
209 | } | 212 | } |
@@ -1269,10 +1272,8 @@ static int pcmcia_bus_add(struct pcmcia_socket *skt) | |||
1269 | 1272 | ||
1270 | static int pcmcia_bus_early_resume(struct pcmcia_socket *skt) | 1273 | static int pcmcia_bus_early_resume(struct pcmcia_socket *skt) |
1271 | { | 1274 | { |
1272 | if (!verify_cis_cache(skt)) { | 1275 | if (!verify_cis_cache(skt)) |
1273 | pcmcia_put_socket(skt); | ||
1274 | return 0; | 1276 | return 0; |
1275 | } | ||
1276 | 1277 | ||
1277 | dev_dbg(&skt->dev, "cis mismatch - different card\n"); | 1278 | dev_dbg(&skt->dev, "cis mismatch - different card\n"); |
1278 | 1279 | ||
diff --git a/drivers/pcmcia/pxa2xx_base.c b/drivers/pcmcia/pxa2xx_base.c index 18474f046e7b..66a54222bbf4 100644 --- a/drivers/pcmcia/pxa2xx_base.c +++ b/drivers/pcmcia/pxa2xx_base.c | |||
@@ -325,21 +325,15 @@ static int pxa2xx_drv_pcmcia_probe(struct platform_device *dev) | |||
325 | goto err1; | 325 | goto err1; |
326 | } | 326 | } |
327 | 327 | ||
328 | if (ret) { | 328 | pxa2xx_configure_sockets(&dev->dev); |
329 | while (--i >= 0) | 329 | dev_set_drvdata(&dev->dev, sinfo); |
330 | soc_pcmcia_remove_one(&sinfo->skt[i]); | ||
331 | kfree(sinfo); | ||
332 | clk_put(clk); | ||
333 | } else { | ||
334 | pxa2xx_configure_sockets(&dev->dev); | ||
335 | dev_set_drvdata(&dev->dev, sinfo); | ||
336 | } | ||
337 | 330 | ||
338 | return 0; | 331 | return 0; |
339 | 332 | ||
340 | err1: | 333 | err1: |
341 | while (--i >= 0) | 334 | while (--i >= 0) |
342 | soc_pcmcia_remove_one(&sinfo->skt[i]); | 335 | soc_pcmcia_remove_one(&sinfo->skt[i]); |
336 | clk_put(clk); | ||
343 | kfree(sinfo); | 337 | kfree(sinfo); |
344 | err0: | 338 | err0: |
345 | return ret; | 339 | return ret; |
diff --git a/drivers/pcmcia/sa1111_generic.c b/drivers/pcmcia/sa1111_generic.c index 7510d506b8c3..ef5848f65241 100644 --- a/drivers/pcmcia/sa1111_generic.c +++ b/drivers/pcmcia/sa1111_generic.c | |||
@@ -177,7 +177,8 @@ static int __devexit pcmcia_remove(struct sa1111_dev *dev) | |||
177 | 177 | ||
178 | dev_set_drvdata(&dev->dev, NULL); | 178 | dev_set_drvdata(&dev->dev, NULL); |
179 | 179 | ||
180 | for (; next = s->next, s; s = next) { | 180 | for (; s; s = next) { |
181 | next = s->next; | ||
181 | soc_pcmcia_remove_one(&s->soc); | 182 | soc_pcmcia_remove_one(&s->soc); |
182 | kfree(s); | 183 | kfree(s); |
183 | } | 184 | } |