diff options
author | Russell King <rmk+kernel@arm.linux.org.uk> | 2011-09-22 12:34:31 +0100 |
---|---|---|
committer | Russell King <rmk+kernel@arm.linux.org.uk> | 2011-09-27 09:25:51 +0100 |
commit | 99df4ee107a85530f3d4f6d628c8a86db9b1a8b3 (patch) | |
tree | cd77ce5245ec0e94b2e4f504c955832071f4107b /drivers/video | |
parent | ac3e2fa6770052a82d42fc4db194a27317518c97 (diff) |
clk: amba-clcd: convert to clk_prepare()/clk_unprepare()
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
Diffstat (limited to 'drivers/video')
-rw-r--r-- | drivers/video/amba-clcd.c | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/drivers/video/amba-clcd.c b/drivers/video/amba-clcd.c index cf03ad067147..2cda6ba0939b 100644 --- a/drivers/video/amba-clcd.c +++ b/drivers/video/amba-clcd.c @@ -447,6 +447,10 @@ static int clcdfb_register(struct clcd_fb *fb) goto out; } + ret = clk_prepare(fb->clk); + if (ret) + goto free_clk; + fb->fb.device = &fb->dev->dev; fb->fb.fix.mmio_start = fb->dev->res.start; @@ -456,7 +460,7 @@ static int clcdfb_register(struct clcd_fb *fb) if (!fb->regs) { printk(KERN_ERR "CLCD: unable to remap registers\n"); ret = -ENOMEM; - goto free_clk; + goto clk_unprep; } fb->fb.fbops = &clcdfb_ops; @@ -530,6 +534,8 @@ static int clcdfb_register(struct clcd_fb *fb) fb_dealloc_cmap(&fb->fb.cmap); unmap: iounmap(fb->regs); + clk_unprep: + clk_unprepare(fb->clk); free_clk: clk_put(fb->clk); out: @@ -595,6 +601,7 @@ static int clcdfb_remove(struct amba_device *dev) if (fb->fb.cmap.len) fb_dealloc_cmap(&fb->fb.cmap); iounmap(fb->regs); + clk_unprepare(fb->clk); clk_put(fb->clk); fb->board->remove(fb); |