summaryrefslogtreecommitdiff
path: root/linux/drivers/media/video/sh_mobile_ceu_camera.c
diff options
context:
space:
mode:
authorGuennadi Liakhovetski <g.liakhovetski@gmx.de>2009-08-25 16:28:22 +0200
committerGuennadi Liakhovetski <g.liakhovetski@gmx.de>2009-08-25 16:28:22 +0200
commit0326f126a4d2f1e2cda2c11725a7f7d7d8273f7f (patch)
tree93ee6755700f373bce9522ec8611a9dcf0161b09 /linux/drivers/media/video/sh_mobile_ceu_camera.c
parent54b9f746c2e8e1fa753c1ce6b3ac30c78d5e2005 (diff)
downloadmediapointer-dvb-s2-0326f126a4d2f1e2cda2c11725a7f7d7d8273f7f.tar.gz
mediapointer-dvb-s2-0326f126a4d2f1e2cda2c11725a7f7d7d8273f7f.tar.bz2
soc-camera: convert to platform device
From: Guennadi Liakhovetski <g.liakhovetski@gmx.de> Convert soc-camera core and all drivers to platform device API. We already converted platforms to register a platform device for each soc-camera client, now we remove the compatibility code and switch completely to the new scheme. This is a preparatory step for the v4l2-subdev conversion. Signed-off-by: Guennadi Liakhovetski <g.liakhovetski@gmx.de> Priority: low
Diffstat (limited to 'linux/drivers/media/video/sh_mobile_ceu_camera.c')
-rw-r--r--linux/drivers/media/video/sh_mobile_ceu_camera.c13
1 files changed, 8 insertions, 5 deletions
diff --git a/linux/drivers/media/video/sh_mobile_ceu_camera.c b/linux/drivers/media/video/sh_mobile_ceu_camera.c
index 1bae28a98..f8e4b5481 100644
--- a/linux/drivers/media/video/sh_mobile_ceu_camera.c
+++ b/linux/drivers/media/video/sh_mobile_ceu_camera.c
@@ -358,11 +358,13 @@ static int sh_mobile_ceu_add_device(struct soc_camera_device *icd)
"SuperH Mobile CEU driver attached to camera %d\n",
icd->devnum);
+ clk_enable(pcdev->clk);
+
ret = icd->ops->init(icd);
- if (ret)
+ if (ret) {
+ clk_disable(pcdev->clk);
goto err;
-
- clk_enable(pcdev->clk);
+ }
ceu_write(pcdev, CAPSR, 1 << 16); /* reset */
while (ceu_read(pcdev, CSTSR) & 1)
@@ -396,10 +398,10 @@ static void sh_mobile_ceu_remove_device(struct soc_camera_device *icd)
}
spin_unlock_irqrestore(&pcdev->lock, flags);
- clk_disable(pcdev->clk);
-
icd->ops->release(icd);
+ clk_disable(pcdev->clk);
+
dev_info(&icd->dev,
"SuperH Mobile CEU driver detached from camera %d\n",
icd->devnum);
@@ -938,3 +940,4 @@ module_exit(sh_mobile_ceu_exit);
MODULE_DESCRIPTION("SuperH Mobile CEU driver");
MODULE_AUTHOR("Magnus Damm");
MODULE_LICENSE("GPL");
+MODULE_ALIAS("platform:sh_mobile_ceu");