aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/video
diff options
context:
space:
mode:
authorPaul Mundt <lethal@linux-sh.org>2008-10-01 03:24:32 -0400
committerPaul Mundt <lethal@linux-sh.org>2008-10-01 03:24:32 -0400
commit225c9a8d1da274bf23efec43ec28b1c9e45e12f8 (patch)
treee47838be04074980744be0f289e274d24d2bb31a /drivers/video
parentbbfbd8b151fe35c9a1180a7f5254c5d6b8387cc0 (diff)
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.c8
1 files changed, 7 insertions, 1 deletions
diff --git a/drivers/video/sh_mobile_lcdcfb.c b/drivers/video/sh_mobile_lcdcfb.c
index 4c32c06579a0..b7468bacce80 100644
--- a/drivers/video/sh_mobile_lcdcfb.c
+++ b/drivers/video/sh_mobile_lcdcfb.c
@@ -16,7 +16,7 @@
16#include <linux/clk.h> 16#include <linux/clk.h>
17#include <linux/platform_device.h> 17#include <linux/platform_device.h>
18#include <linux/dma-mapping.h> 18#include <linux/dma-mapping.h>
19#include <asm/sh_mobile_lcdc.h> 19#include <video/sh_mobile_lcdc.h>
20 20
21#define PALETTE_NR 16 21#define PALETTE_NR 16
22 22
@@ -34,7 +34,9 @@ struct sh_mobile_lcdc_chan {
34 34
35struct sh_mobile_lcdc_priv { 35struct sh_mobile_lcdc_priv {
36 void __iomem *base; 36 void __iomem *base;
37#ifdef CONFIG_HAVE_CLK
37 struct clk *clk; 38 struct clk *clk;
39#endif
38 unsigned long lddckr; 40 unsigned long lddckr;
39 struct sh_mobile_lcdc_chan ch[2]; 41 struct sh_mobile_lcdc_chan ch[2];
40}; 42};
@@ -422,6 +424,7 @@ static int sh_mobile_lcdc_setup_clocks(struct device *dev, int clock_source,
422 424
423 priv->lddckr = icksel << 16; 425 priv->lddckr = icksel << 16;
424 426
427#ifdef CONFIG_HAVE_CLK
425 if (str) { 428 if (str) {
426 priv->clk = clk_get(dev, str); 429 priv->clk = clk_get(dev, str);
427 if (IS_ERR(priv->clk)) { 430 if (IS_ERR(priv->clk)) {
@@ -431,6 +434,7 @@ static int sh_mobile_lcdc_setup_clocks(struct device *dev, int clock_source,
431 434
432 clk_enable(priv->clk); 435 clk_enable(priv->clk);
433 } 436 }
437#endif
434 438
435 return 0; 439 return 0;
436} 440}
@@ -688,10 +692,12 @@ static int sh_mobile_lcdc_remove(struct platform_device *pdev)
688 fb_dealloc_cmap(&info->cmap); 692 fb_dealloc_cmap(&info->cmap);
689 } 693 }
690 694
695#ifdef CONFIG_HAVE_CLK
691 if (priv->clk) { 696 if (priv->clk) {
692 clk_disable(priv->clk); 697 clk_disable(priv->clk);
693 clk_put(priv->clk); 698 clk_put(priv->clk);
694 } 699 }
700#endif
695 701
696 if (priv->base) 702 if (priv->base)
697 iounmap(priv->base); 703 iounmap(priv->base);