aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/pcmcia/sa1111_generic.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/pcmcia/sa1111_generic.c')
-rw-r--r--drivers/pcmcia/sa1111_generic.c11
1 files changed, 9 insertions, 2 deletions
diff --git a/drivers/pcmcia/sa1111_generic.c b/drivers/pcmcia/sa1111_generic.c
index 27f2fe3b7fb4..0735c3e6a8b0 100644
--- a/drivers/pcmcia/sa1111_generic.c
+++ b/drivers/pcmcia/sa1111_generic.c
@@ -163,12 +163,18 @@ int sa1111_pcmcia_add(struct sa1111_dev *dev, struct pcmcia_low_level *ops,
163static int pcmcia_probe(struct sa1111_dev *dev) 163static int pcmcia_probe(struct sa1111_dev *dev)
164{ 164{
165 void __iomem *base; 165 void __iomem *base;
166 int ret;
167
168 ret = sa1111_enable_device(dev);
169 if (ret)
170 return ret;
166 171
167 dev_set_drvdata(&dev->dev, NULL); 172 dev_set_drvdata(&dev->dev, NULL);
168 173
169 if (!request_mem_region(dev->res.start, 512, 174 if (!request_mem_region(dev->res.start, 512, SA1111_DRIVER_NAME(dev))) {
170 SA1111_DRIVER_NAME(dev))) 175 sa1111_disable_device(dev);
171 return -EBUSY; 176 return -EBUSY;
177 }
172 178
173 base = dev->mapbase; 179 base = dev->mapbase;
174 180
@@ -212,6 +218,7 @@ static int __devexit pcmcia_remove(struct sa1111_dev *dev)
212 } 218 }
213 219
214 release_mem_region(dev->res.start, 512); 220 release_mem_region(dev->res.start, 512);
221 sa1111_disable_device(dev);
215 return 0; 222 return 0;
216} 223}
217 224