diff options
author | Paul Mundt <lethal@linux-sh.org> | 2008-10-01 16:24:32 +0900 |
---|---|---|
committer | Paul Mundt <lethal@linux-sh.org> | 2008-10-01 16:24:32 +0900 |
commit | 225c9a8d1da274bf23efec43ec28b1c9e45e12f8 (patch) | |
tree | e47838be04074980744be0f289e274d24d2bb31a /drivers/video | |
parent | bbfbd8b151fe35c9a1180a7f5254c5d6b8387cc0 (diff) | |
download | op-kernel-dev-225c9a8d1da274bf23efec43ec28b1c9e45e12f8.zip op-kernel-dev-225c9a8d1da274bf23efec43ec28b1c9e45e12f8.tar.gz |
video: sh_mobile_lcdcfb: Support HAVE_CLK=n configurations.
This provides a workaround for users of sh_mobile_lcdcfb that don't
define HAVE_CLK and have otherwise sane clock initialization.
At the same time, move the sh_mobile_lcdc.h header to include/video/.
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
Diffstat (limited to 'drivers/video')
-rw-r--r-- | drivers/video/sh_mobile_lcdcfb.c | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/drivers/video/sh_mobile_lcdcfb.c b/drivers/video/sh_mobile_lcdcfb.c index 4c32c06..b7468ba 100644 --- a/drivers/video/sh_mobile_lcdcfb.c +++ b/drivers/video/sh_mobile_lcdcfb.c @@ -16,7 +16,7 @@ #include <linux/clk.h> #include <linux/platform_device.h> #include <linux/dma-mapping.h> -#include <asm/sh_mobile_lcdc.h> +#include <video/sh_mobile_lcdc.h> #define PALETTE_NR 16 @@ -34,7 +34,9 @@ struct sh_mobile_lcdc_chan { struct sh_mobile_lcdc_priv { void __iomem *base; +#ifdef CONFIG_HAVE_CLK struct clk *clk; +#endif unsigned long lddckr; struct sh_mobile_lcdc_chan ch[2]; }; @@ -422,6 +424,7 @@ static int sh_mobile_lcdc_setup_clocks(struct device *dev, int clock_source, priv->lddckr = icksel << 16; +#ifdef CONFIG_HAVE_CLK if (str) { priv->clk = clk_get(dev, str); if (IS_ERR(priv->clk)) { @@ -431,6 +434,7 @@ static int sh_mobile_lcdc_setup_clocks(struct device *dev, int clock_source, clk_enable(priv->clk); } +#endif return 0; } @@ -688,10 +692,12 @@ static int sh_mobile_lcdc_remove(struct platform_device *pdev) fb_dealloc_cmap(&info->cmap); } +#ifdef CONFIG_HAVE_CLK if (priv->clk) { clk_disable(priv->clk); clk_put(priv->clk); } +#endif if (priv->base) iounmap(priv->base); |