diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2011-10-27 08:41:50 +0200 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2011-10-27 08:41:50 +0200 |
commit | 18974369cfe23acf16d0fb79e0d1fba7a9a95ec0 (patch) | |
tree | 22367984dbd4c79e9635035e268c428444c40e76 /drivers/video | |
parent | 7e0a6fd5a4723c79cc46c9541e343092302e0e5b (diff) | |
parent | 196a57c2749119be4732cc2b2adb8aafcb4fcb14 (diff) | |
download | lwn-18974369cfe23acf16d0fb79e0d1fba7a9a95ec0.tar.gz lwn-18974369cfe23acf16d0fb79e0d1fba7a9a95ec0.zip |
Merge branch 'clk' of http://ftp.arm.linux.org.uk/pub/linux/arm/kernel/git-cur/linux-2.6-arm
* 'clk' of http://ftp.arm.linux.org.uk/pub/linux/arm/kernel/git-cur/linux-2.6-arm:
ARM: 7131/1: clkdev: Add Common Macro for clk_lookup
clk: spi-pl022: convert to clk_prepare()/clk_unprepare()
clk: timer-sp: convert to clk_prepare()/clk_unprepare()
clk: sa1111: convert to clk_prepare()/clk_unprepare()
clk: mmci: convert to clk_prepare()/clk_unprepare()
clk: amba-pl011: convert to clk_prepare()/clk_unprepare()
clk: amba-pl010: convert to clk_prepare()/clk_unprepare()
clk: amba-clcd: convert to clk_prepare()/clk_unprepare()
clk: amba bus: convert to clk_prepare()/clk_unprepare()
clk: provide prepare/unprepare functions
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); |