Skip to content

Commit

Permalink
[media] video: mx1_camera: Use clk_prepare_enable/clk_disable_unprepare
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Fabio Estevam authored and Mauro Carvalho Chehab committed Aug 15, 2012
1 parent 1690d86 commit 5c4dfc8
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions drivers/media/video/mx1_camera.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand All @@ -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);
}

/*
Expand Down

0 comments on commit 5c4dfc8

Please sign in to comment.