aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/char
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/char
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/char')
-rw-r--r--drivers/char/pcmcia/cm4000_cs.c3
-rw-r--r--drivers/char/pcmcia/cm4040_cs.c3
-rw-r--r--drivers/char/pcmcia/synclink_cs.c10
3 files changed, 3 insertions, 13 deletions
diff --git a/drivers/char/pcmcia/cm4000_cs.c b/drivers/char/pcmcia/cm4000_cs.c
index 5fdf18515433..3ddd3da9e720 100644
--- a/drivers/char/pcmcia/cm4000_cs.c
+++ b/drivers/char/pcmcia/cm4000_cs.c
@@ -1899,8 +1899,7 @@ static int cm4000_resume(struct pcmcia_device *p_dev)
1899static void cm4000_release(dev_link_t *link) 1899static void cm4000_release(dev_link_t *link)
1900{ 1900{
1901 cmm_cm4000_release(link->priv); /* delay release until device closed */ 1901 cmm_cm4000_release(link->priv); /* delay release until device closed */
1902 pcmcia_release_configuration(link->handle); 1902 pcmcia_disable_device(link->handle);
1903 pcmcia_release_io(link->handle, &link->io);
1904} 1903}
1905 1904
1906static int cm4000_attach(struct pcmcia_device *p_dev) 1905static int cm4000_attach(struct pcmcia_device *p_dev)
diff --git a/drivers/char/pcmcia/cm4040_cs.c b/drivers/char/pcmcia/cm4040_cs.c
index 466e33bab029..1c355bd2be88 100644
--- a/drivers/char/pcmcia/cm4040_cs.c
+++ b/drivers/char/pcmcia/cm4040_cs.c
@@ -654,8 +654,7 @@ static int reader_resume(struct pcmcia_device *p_dev)
654static void reader_release(dev_link_t *link) 654static void reader_release(dev_link_t *link)
655{ 655{
656 cm4040_reader_release(link->priv); 656 cm4040_reader_release(link->priv);
657 pcmcia_release_configuration(link->handle); 657 pcmcia_disable_device(link->handle);
658 pcmcia_release_io(link->handle, &link->io);
659} 658}
660 659
661static int reader_attach(struct pcmcia_device *p_dev) 660static int reader_attach(struct pcmcia_device *p_dev)
diff --git a/drivers/char/pcmcia/synclink_cs.c b/drivers/char/pcmcia/synclink_cs.c
index e6b714b6390d..371d10b78004 100644
--- a/drivers/char/pcmcia/synclink_cs.c
+++ b/drivers/char/pcmcia/synclink_cs.c
@@ -710,15 +710,7 @@ static void mgslpc_release(u_long arg)
710 if (debug_level >= DEBUG_LEVEL_INFO) 710 if (debug_level >= DEBUG_LEVEL_INFO)
711 printk("mgslpc_release(0x%p)\n", link); 711 printk("mgslpc_release(0x%p)\n", link);
712 712
713 /* Unlink the device chain */ 713 pcmcia_disable_device(link->handle);
714 link->dev = NULL;
715 link->state &= ~DEV_CONFIG;
716
717 pcmcia_release_configuration(link->handle);
718 if (link->io.NumPorts1)
719 pcmcia_release_io(link->handle, &link->io);
720 if (link->irq.AssignedIRQ)
721 pcmcia_release_irq(link->handle, &link->irq);
722} 714}
723 715
724static void mgslpc_detach(struct pcmcia_device *p_dev) 716static void mgslpc_detach(struct pcmcia_device *p_dev)