diff options
author | Fabio Estevam <fabio.estevam@freescale.com> | 2012-05-25 19:14:47 -0400 |
---|---|---|
committer | Mauro Carvalho Chehab <mchehab@redhat.com> | 2012-08-15 16:16:19 -0400 |
commit | 52cf3e42951e8316af9ff0db002f169e3efb63e9 (patch) | |
tree | ce60eced86a2a556e5633af94cc6edfbb90197e4 /drivers/media | |
parent | dc5d598219ed5e914ec139d8c82d0866cdb7b8ce (diff) |
[media] video: mx1_camera: Use clk_prepare_enable/clk_disable_unprepare
Prepare the clock before enabling it.
Cc: Guennadi Liakhovetski <g.liakhovetski@gmx.de>
Cc: <linux-media@vger.kernel.org>
Signed-off-by: Fabio Estevam <fabio.estevam@freescale.com>
Signed-off-by: Guennadi Liakhovetski <g.liakhovetski@gmx.de>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Diffstat (limited to 'drivers/media')
-rw-r--r-- | drivers/media/platform/mx1_camera.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/media/platform/mx1_camera.c b/drivers/media/platform/mx1_camera.c index d2e6f82ecfa..560a65aa703 100644 --- a/drivers/media/platform/mx1_camera.c +++ b/drivers/media/platform/mx1_camera.c | |||
@@ -403,7 +403,7 @@ static void mx1_camera_activate(struct mx1_camera_dev *pcdev) | |||
403 | 403 | ||
404 | dev_dbg(pcdev->icd->parent, "Activate device\n"); | 404 | dev_dbg(pcdev->icd->parent, "Activate device\n"); |
405 | 405 | ||
406 | clk_enable(pcdev->clk); | 406 | clk_prepare_enable(pcdev->clk); |
407 | 407 | ||
408 | /* enable CSI before doing anything else */ | 408 | /* enable CSI before doing anything else */ |
409 | __raw_writel(csicr1, pcdev->base + CSICR1); | 409 | __raw_writel(csicr1, pcdev->base + CSICR1); |
@@ -422,7 +422,7 @@ static void mx1_camera_deactivate(struct mx1_camera_dev *pcdev) | |||
422 | /* Disable all CSI interface */ | 422 | /* Disable all CSI interface */ |
423 | __raw_writel(0x00, pcdev->base + CSICR1); | 423 | __raw_writel(0x00, pcdev->base + CSICR1); |
424 | 424 | ||
425 | clk_disable(pcdev->clk); | 425 | clk_disable_unprepare(pcdev->clk); |
426 | } | 426 | } |
427 | 427 | ||
428 | /* | 428 | /* |