diff options
author | Shawn Guo <shawn.guo@linaro.org> | 2011-12-20 01:12:54 -0500 |
---|---|---|
committer | Shawn Guo <shawn.guo@linaro.org> | 2011-12-28 08:30:49 -0500 |
commit | ca4c22d391b8a5ac2b79135213ca68abc7aeb984 (patch) | |
tree | 998c52c6e3b09bd2c8f9ff4042fe0d8b1edac642 /drivers/video/mxsfb.c | |
parent | a481377013c1c07dac0421886db7a6b4c3081c49 (diff) |
video: mxsfb: convert to clk_prepare/clk_unprepare
The patch converts mxsfb driver to clk_prepare/clk_unprepare by
using helper functions clk_prepare_enable/clk_disable_unprepare.
Signed-off-by: Shawn Guo <shawn.guo@linaro.org>
Cc: Sascha Hauer <s.hauer@pengutronix.de>
Acked-by: Marek Vasut <marek.vasut@gmail.com>
Acked-by: Florian Tobias Schandinat <FlorianSchandinat@gmx.de>
Diffstat (limited to 'drivers/video/mxsfb.c')
-rw-r--r-- | drivers/video/mxsfb.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/drivers/video/mxsfb.c b/drivers/video/mxsfb.c index d837d63c456f..eb3c5eea1a0f 100644 --- a/drivers/video/mxsfb.c +++ b/drivers/video/mxsfb.c | |||
@@ -328,7 +328,7 @@ static void mxsfb_enable_controller(struct fb_info *fb_info) | |||
328 | 328 | ||
329 | dev_dbg(&host->pdev->dev, "%s\n", __func__); | 329 | dev_dbg(&host->pdev->dev, "%s\n", __func__); |
330 | 330 | ||
331 | clk_enable(host->clk); | 331 | clk_prepare_enable(host->clk); |
332 | clk_set_rate(host->clk, PICOS2KHZ(fb_info->var.pixclock) * 1000U); | 332 | clk_set_rate(host->clk, PICOS2KHZ(fb_info->var.pixclock) * 1000U); |
333 | 333 | ||
334 | /* if it was disabled, re-enable the mode again */ | 334 | /* if it was disabled, re-enable the mode again */ |
@@ -368,7 +368,7 @@ static void mxsfb_disable_controller(struct fb_info *fb_info) | |||
368 | 368 | ||
369 | writel(VDCTRL4_SYNC_SIGNALS_ON, host->base + LCDC_VDCTRL4 + REG_CLR); | 369 | writel(VDCTRL4_SYNC_SIGNALS_ON, host->base + LCDC_VDCTRL4 + REG_CLR); |
370 | 370 | ||
371 | clk_disable(host->clk); | 371 | clk_disable_unprepare(host->clk); |
372 | 372 | ||
373 | host->enabled = 0; | 373 | host->enabled = 0; |
374 | } | 374 | } |
@@ -668,7 +668,7 @@ static int __devinit mxsfb_restore_mode(struct mxsfb_info *host) | |||
668 | line_count = fb_info->fix.smem_len / fb_info->fix.line_length; | 668 | line_count = fb_info->fix.smem_len / fb_info->fix.line_length; |
669 | fb_info->fix.ypanstep = 1; | 669 | fb_info->fix.ypanstep = 1; |
670 | 670 | ||
671 | clk_enable(host->clk); | 671 | clk_prepare_enable(host->clk); |
672 | host->enabled = 1; | 672 | host->enabled = 1; |
673 | 673 | ||
674 | return 0; | 674 | return 0; |
@@ -841,7 +841,7 @@ static int __devinit mxsfb_probe(struct platform_device *pdev) | |||
841 | 841 | ||
842 | error_register: | 842 | error_register: |
843 | if (host->enabled) | 843 | if (host->enabled) |
844 | clk_disable(host->clk); | 844 | clk_disable_unprepare(host->clk); |
845 | fb_destroy_modelist(&fb_info->modelist); | 845 | fb_destroy_modelist(&fb_info->modelist); |
846 | error_init_fb: | 846 | error_init_fb: |
847 | kfree(fb_info->pseudo_palette); | 847 | kfree(fb_info->pseudo_palette); |