aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/parport
diff options
context:
space:
mode:
authorDominik Brodowski <linux@dominikbrodowski.net>2006-01-15 03:32:39 -0500
committerDominik Brodowski <linux@dominikbrodowski.net>2006-03-31 10:15:50 -0500
commit5f2a71fcb7995633b335a1e380ac63a968e61320 (patch)
treed47f4227d314fc9f298b75c217fa78440004e6e7 /drivers/parport
parent1de9cedfbdff1d8adb662cd3afc5bda66e393351 (diff)
[PATCH] pcmcia: add pcmcia_disable_device
pcmcia_disable_device(struct pcmcia_device *p_dev) performs the necessary cleanups upon device or driver removal: it calls the appropriate pcmcia_release_* functions, and can replace (most) of the current drivers' _release() functions. Signed-off-by: Dominik Brodowski <linux@dominikbrodowski.net>
Diffstat (limited to 'drivers/parport')
-rw-r--r--drivers/parport/parport_cs.c24
1 files changed, 9 insertions, 15 deletions
diff --git a/drivers/parport/parport_cs.c b/drivers/parport/parport_cs.c
index d0fc8be56954..7edd7ef6c31f 100644
--- a/drivers/parport/parport_cs.c
+++ b/drivers/parport/parport_cs.c
@@ -267,23 +267,17 @@ failed:
267 267
268void parport_cs_release(dev_link_t *link) 268void parport_cs_release(dev_link_t *link)
269{ 269{
270 parport_info_t *info = link->priv; 270 parport_info_t *info = link->priv;
271
272 DEBUG(0, "parport_release(0x%p)\n", link);
273 271
274 if (info->ndev) { 272 DEBUG(0, "parport_release(0x%p)\n", link);
275 struct parport *p = info->port; 273
276 parport_pc_unregister_port(p); 274 if (info->ndev) {
277 } 275 struct parport *p = info->port;
278 info->ndev = 0; 276 parport_pc_unregister_port(p);
279 link->dev = NULL; 277 }
280 278 info->ndev = 0;
281 pcmcia_release_configuration(link->handle);
282 pcmcia_release_io(link->handle, &link->io);
283 pcmcia_release_irq(link->handle, &link->irq);
284
285 link->state &= ~DEV_CONFIG;
286 279
280 pcmcia_disable_device(link->handle);
287} /* parport_cs_release */ 281} /* parport_cs_release */
288 282
289static int parport_suspend(struct pcmcia_device *dev) 283static int parport_suspend(struct pcmcia_device *dev)