PCMCIA: soc_common: push socket removal down to SoC specific support
Mechanically transplant the removal code from soc_common into each
SoC specific base support file, thereby allowing
soc_common_drv_pcmcia_remove to be removed. No other changes.
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
Signed-off-by: Dominik Brodowski <linux@dominikbrodowski.net>
diff --git a/drivers/pcmcia/sa1111_generic.c b/drivers/pcmcia/sa1111_generic.c
index 4be4e17..a6793e3 100644
--- a/drivers/pcmcia/sa1111_generic.c
+++ b/drivers/pcmcia/sa1111_generic.c
@@ -152,7 +152,15 @@
static int __devexit pcmcia_remove(struct sa1111_dev *dev)
{
- soc_common_drv_pcmcia_remove(&dev->dev);
+ struct skt_dev_info *sinfo = dev_get_drvdata(&dev->dev);
+ int i;
+
+ dev_set_drvdata(&dev->dev, NULL);
+
+ for (i = 0; i < sinfo->nskt; i++)
+ soc_pcmcia_remove_one(&sinfo->skt[i]);
+
+ kfree(sinfo);
release_mem_region(dev->res.start, 512);
return 0;
}