mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-29 11:11:45 -04:00
ARM: sa1111: add platform enable/disable functions
Add platform hooks to be called when individual sa1111 devices are enabled and disabled. This will allow us to move some platform specifics out of the individual drivers. Acked-by: Nicolas Pitre <[email protected]> Signed-off-by: Russell King <[email protected]>
This commit is contained in:
parent
6bd72f0562
commit
ae99ddbc97
5 changed files with 51 additions and 15 deletions
|
|
@ -163,12 +163,18 @@ int sa1111_pcmcia_add(struct sa1111_dev *dev, struct pcmcia_low_level *ops,
|
|||
static int pcmcia_probe(struct sa1111_dev *dev)
|
||||
{
|
||||
void __iomem *base;
|
||||
int ret;
|
||||
|
||||
ret = sa1111_enable_device(dev);
|
||||
if (ret)
|
||||
return ret;
|
||||
|
||||
dev_set_drvdata(&dev->dev, NULL);
|
||||
|
||||
if (!request_mem_region(dev->res.start, 512,
|
||||
SA1111_DRIVER_NAME(dev)))
|
||||
if (!request_mem_region(dev->res.start, 512, SA1111_DRIVER_NAME(dev))) {
|
||||
sa1111_disable_device(dev);
|
||||
return -EBUSY;
|
||||
}
|
||||
|
||||
base = dev->mapbase;
|
||||
|
||||
|
|
@ -212,6 +218,7 @@ static int __devexit pcmcia_remove(struct sa1111_dev *dev)
|
|||
}
|
||||
|
||||
release_mem_region(dev->res.start, 512);
|
||||
sa1111_disable_device(dev);
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue