Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 163316
b: refs/heads/master
c: 727dc3f
h: refs/heads/master
v: v3
  • Loading branch information
Paul Mundt committed Jul 7, 2009
1 parent 54ec696 commit 3bac3a6
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 17 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 7119888df1fd115573616ae43747b2e823b0663e
refs/heads/master: 727dc3fde82969609e1e69f1f12de83c2fe41238
2 changes: 1 addition & 1 deletion trunk/drivers/video/Kconfig
Original file line number Diff line number Diff line change
Expand Up @@ -1866,7 +1866,7 @@ config FB_W100

config FB_SH_MOBILE_LCDC
tristate "SuperH Mobile LCDC framebuffer support"
depends on FB && SUPERH
depends on FB && SUPERH && HAVE_CLK
select FB_SYS_FILLRECT
select FB_SYS_COPYAREA
select FB_SYS_IMAGEBLIT
Expand Down
16 changes: 1 addition & 15 deletions trunk/drivers/video/sh_mobile_lcdcfb.c
Original file line number Diff line number Diff line change
Expand Up @@ -42,11 +42,9 @@ struct sh_mobile_lcdc_chan {
struct sh_mobile_lcdc_priv {
void __iomem *base;
int irq;
#ifdef CONFIG_HAVE_CLK
atomic_t clk_usecnt;
struct clk *dot_clk;
struct clk *clk;
#endif
unsigned long lddckr;
struct sh_mobile_lcdc_chan ch[2];
int started;
Expand Down Expand Up @@ -185,7 +183,6 @@ struct sh_mobile_lcdc_sys_bus_ops sh_mobile_lcdc_sys_bus_ops = {
lcdc_sys_read_data,
};

#ifdef CONFIG_HAVE_CLK
static void sh_mobile_lcdc_clk_on(struct sh_mobile_lcdc_priv *priv)
{
if (atomic_inc_and_test(&priv->clk_usecnt)) {
Expand All @@ -203,10 +200,6 @@ static void sh_mobile_lcdc_clk_off(struct sh_mobile_lcdc_priv *priv)
clk_disable(priv->clk);
}
}
#else
static void sh_mobile_lcdc_clk_on(struct sh_mobile_lcdc_priv *priv) {}
static void sh_mobile_lcdc_clk_off(struct sh_mobile_lcdc_priv *priv) {}
#endif

static int sh_mobile_lcdc_sginit(struct fb_info *info,
struct list_head *pagelist)
Expand Down Expand Up @@ -515,7 +508,6 @@ static void sh_mobile_lcdc_stop(struct sh_mobile_lcdc_priv *priv)
board_cfg = &ch->cfg.board_cfg;
if (board_cfg->display_off)
board_cfg->display_off(board_cfg->board_data);

}

/* stop the lcdc */
Expand Down Expand Up @@ -574,9 +566,7 @@ static int sh_mobile_lcdc_setup_clocks(struct platform_device *pdev,
int clock_source,
struct sh_mobile_lcdc_priv *priv)
{
#ifdef CONFIG_HAVE_CLK
char clk_name[8];
#endif
char *str;
int icksel;

Expand All @@ -590,15 +580,14 @@ static int sh_mobile_lcdc_setup_clocks(struct platform_device *pdev,

priv->lddckr = icksel << 16;

#ifdef CONFIG_HAVE_CLK
atomic_set(&priv->clk_usecnt, -1);
snprintf(clk_name, sizeof(clk_name), "lcdc%d", pdev->id);
priv->clk = clk_get(&pdev->dev, clk_name);
if (IS_ERR(priv->clk)) {
dev_err(&pdev->dev, "cannot get clock \"%s\"\n", clk_name);
return PTR_ERR(priv->clk);
}

if (str) {
priv->dot_clk = clk_get(&pdev->dev, str);
if (IS_ERR(priv->dot_clk)) {
Expand All @@ -607,7 +596,6 @@ static int sh_mobile_lcdc_setup_clocks(struct platform_device *pdev,
return PTR_ERR(priv->dot_clk);
}
}
#endif

return 0;
}
Expand Down Expand Up @@ -934,11 +922,9 @@ static int sh_mobile_lcdc_remove(struct platform_device *pdev)
fb_dealloc_cmap(&info->cmap);
}

#ifdef CONFIG_HAVE_CLK
if (priv->dot_clk)
clk_put(priv->dot_clk);
clk_put(priv->clk);
#endif

if (priv->base)
iounmap(priv->base);
Expand Down

0 comments on commit 3bac3a6

Please sign in to comment.