Commit be85458e authored by Russell King - ARM Linux's avatar Russell King - ARM Linux Committed by Dominik Brodowski

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: default avatarRussell King <rmk+kernel@arm.linux.org.uk>
Signed-off-by: default avatarDominik Brodowski <linux@dominikbrodowski.net>
parent 097e296d
...@@ -297,7 +297,16 @@ static int pxa2xx_drv_pcmcia_probe(struct platform_device *dev) ...@@ -297,7 +297,16 @@ static int pxa2xx_drv_pcmcia_probe(struct platform_device *dev)
static int pxa2xx_drv_pcmcia_remove(struct platform_device *dev) static int pxa2xx_drv_pcmcia_remove(struct platform_device *dev)
{ {
return soc_common_drv_pcmcia_remove(&dev->dev); struct skt_dev_info *sinfo = platform_get_drvdata(dev);
int i;
platform_set_drvdata(dev, NULL);
for (i = 0; i < sinfo->nskt; i++)
soc_pcmcia_remove_one(&sinfo->skt[i]);
kfree(sinfo);
return 0;
} }
static int pxa2xx_drv_pcmcia_suspend(struct device *dev) static int pxa2xx_drv_pcmcia_suspend(struct device *dev)
......
...@@ -83,7 +83,16 @@ static int sa11x0_drv_pcmcia_probe(struct platform_device *dev) ...@@ -83,7 +83,16 @@ static int sa11x0_drv_pcmcia_probe(struct platform_device *dev)
static int sa11x0_drv_pcmcia_remove(struct platform_device *dev) static int sa11x0_drv_pcmcia_remove(struct platform_device *dev)
{ {
return soc_common_drv_pcmcia_remove(&dev->dev); struct skt_dev_info *sinfo = platform_get_drvdata(dev);
int i;
platform_set_drvdata(dev, NULL);
for (i = 0; i < sinfo->nskt; i++)
soc_pcmcia_remove_one(&sinfo->skt[i]);
kfree(sinfo);
return 0;
} }
static int sa11x0_drv_pcmcia_suspend(struct platform_device *dev, static int sa11x0_drv_pcmcia_suspend(struct platform_device *dev,
......
...@@ -152,7 +152,15 @@ static int pcmcia_probe(struct sa1111_dev *dev) ...@@ -152,7 +152,15 @@ static int pcmcia_probe(struct sa1111_dev *dev)
static int __devexit pcmcia_remove(struct sa1111_dev *dev) 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); release_mem_region(dev->res.start, 512);
return 0; return 0;
} }
......
...@@ -778,22 +778,6 @@ int soc_common_drv_pcmcia_probe(struct device *dev, struct pcmcia_low_level *ops ...@@ -778,22 +778,6 @@ int soc_common_drv_pcmcia_probe(struct device *dev, struct pcmcia_low_level *ops
} }
EXPORT_SYMBOL(soc_common_drv_pcmcia_probe); EXPORT_SYMBOL(soc_common_drv_pcmcia_probe);
int soc_common_drv_pcmcia_remove(struct device *dev)
{
struct skt_dev_info *sinfo = dev_get_drvdata(dev);
int i;
dev_set_drvdata(dev, NULL);
for (i = 0; i < sinfo->nskt; i++)
soc_pcmcia_remove_one(&sinfo->skt[i]);
kfree(sinfo);
return 0;
}
EXPORT_SYMBOL(soc_common_drv_pcmcia_remove);
MODULE_AUTHOR("John Dorsey <john+@cs.cmu.edu>"); MODULE_AUTHOR("John Dorsey <john+@cs.cmu.edu>");
MODULE_DESCRIPTION("Linux PCMCIA Card Services: Common SoC support"); MODULE_DESCRIPTION("Linux PCMCIA Card Services: Common SoC support");
MODULE_LICENSE("Dual MPL/GPL"); MODULE_LICENSE("Dual MPL/GPL");
...@@ -139,7 +139,6 @@ void soc_pcmcia_remove_one(struct soc_pcmcia_socket *skt); ...@@ -139,7 +139,6 @@ void soc_pcmcia_remove_one(struct soc_pcmcia_socket *skt);
int soc_pcmcia_add_one(struct soc_pcmcia_socket *skt); int soc_pcmcia_add_one(struct soc_pcmcia_socket *skt);
extern int soc_common_drv_pcmcia_probe(struct device *dev, struct pcmcia_low_level *ops, struct skt_dev_info *sinfo); extern int soc_common_drv_pcmcia_probe(struct device *dev, struct pcmcia_low_level *ops, struct skt_dev_info *sinfo);
extern int soc_common_drv_pcmcia_remove(struct device *dev);
#ifdef CONFIG_PCMCIA_DEBUG #ifdef CONFIG_PCMCIA_DEBUG
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment