[media] video: mx1_camera: Use clk_prepare_enable/clk_disable_unprepare
authorFabio Estevam <fabio.estevam@freescale.com>
Fri, 25 May 2012 23:14:47 +0000 (20:14 -0300)
committerMauro Carvalho Chehab <mchehab@redhat.com>
Wed, 15 Aug 2012 22:23:20 +0000 (19:23 -0300)
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>
drivers/media/video/mx1_camera.c

index d2e6f82..560a65a 100644 (file)
@@ -403,7 +403,7 @@ static void mx1_camera_activate(struct mx1_camera_dev *pcdev)
 
        dev_dbg(pcdev->icd->parent, "Activate device\n");
 
-       clk_enable(pcdev->clk);
+       clk_prepare_enable(pcdev->clk);
 
        /* enable CSI before doing anything else */
        __raw_writel(csicr1, pcdev->base + CSICR1);
@@ -422,7 +422,7 @@ static void mx1_camera_deactivate(struct mx1_camera_dev *pcdev)
        /* Disable all CSI interface */
        __raw_writel(0x00, pcdev->base + CSICR1);
 
-       clk_disable(pcdev->clk);
+       clk_disable_unprepare(pcdev->clk);
 }
 
 /*