Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 294235
b: refs/heads/master
c: db85905
h: refs/heads/master
i:
  294233: 90805e2
  294231: 365510e
v: v3
  • Loading branch information
Laurent Pinchart committed Mar 12, 2012
1 parent 29e1725 commit 0abecee
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 32 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: d2c594a014563175b54115d1a73b607aaeb650ec
refs/heads/master: db85905ad95b090941dc894b7f93f9f3818bdc07
37 changes: 6 additions & 31 deletions trunk/drivers/video/sh_mobile_hdmi.c
Original file line number Diff line number Diff line change
Expand Up @@ -1004,8 +1004,8 @@ static irqreturn_t sh_hdmi_hotplug(int irq, void *dev_id)
}

/* locking: called with info->lock held, or before register_framebuffer() */
static int __sh_hdmi_display_on(struct sh_mobile_lcdc_entity *entity,
struct fb_info *info)
static int sh_hdmi_display_on(struct sh_mobile_lcdc_entity *entity,
struct fb_info *info)
{
/*
* info is guaranteed to be valid, when we are called, because our
Expand Down Expand Up @@ -1040,13 +1040,8 @@ static int __sh_hdmi_display_on(struct sh_mobile_lcdc_entity *entity,
return 0;
}

static void sh_hdmi_display_on(void *arg, struct fb_info *info)
{
__sh_hdmi_display_on(arg, info);
}

/* locking: called with info->lock held */
static void __sh_hdmi_display_off(struct sh_mobile_lcdc_entity *entity)
static void sh_hdmi_display_off(struct sh_mobile_lcdc_entity *entity)
{
struct sh_hdmi *hdmi = entity_to_sh_hdmi(entity);

Expand All @@ -1055,14 +1050,9 @@ static void __sh_hdmi_display_off(struct sh_mobile_lcdc_entity *entity)
hdmi_write(hdmi, 0x10, HDMI_SYSTEM_CTRL);
}

static void sh_hdmi_display_off(void *arg)
{
__sh_hdmi_display_off(arg);
}

static const struct sh_mobile_lcdc_entity_ops sh_hdmi_ops = {
.display_on = __sh_hdmi_display_on,
.display_off = __sh_hdmi_display_off,
.display_on = sh_hdmi_display_on,
.display_off = sh_hdmi_display_off,
};

static bool sh_hdmi_must_reconfigure(struct sh_hdmi *hdmi)
Expand Down Expand Up @@ -1178,7 +1168,7 @@ static void sh_hdmi_edid_work_fn(struct work_struct *work)
*/
info->var.width = hdmi->var.width;
info->var.height = hdmi->var.height;
__sh_hdmi_display_on(&hdmi->entity, info);
sh_hdmi_display_on(&hdmi->entity, info);
} else {
/* New monitor or have to wake up */
fb_set_suspend(info, 0);
Expand Down Expand Up @@ -1255,7 +1245,6 @@ static int __init sh_hdmi_probe(struct platform_device *pdev)
{
struct sh_mobile_hdmi_info *pdata = pdev->dev.platform_data;
struct resource *res = platform_get_resource(pdev, IORESOURCE_MEM, 0);
struct sh_mobile_lcdc_board_cfg *board_cfg;
int irq = platform_get_irq(pdev, 0), ret;
struct sh_hdmi *hdmi;
long rate;
Expand Down Expand Up @@ -1315,13 +1304,6 @@ static int __init sh_hdmi_probe(struct platform_device *pdev)

platform_set_drvdata(pdev, &hdmi->entity);

/* Set up LCDC callbacks */
board_cfg = &pdata->lcd_chan->board_cfg;
board_cfg->owner = THIS_MODULE;
board_cfg->board_data = &hdmi->entity;
board_cfg->display_on = sh_hdmi_display_on;
board_cfg->display_off = sh_hdmi_display_off;

INIT_DELAYED_WORK(&hdmi->edid_work, sh_hdmi_edid_work_fn);

pm_runtime_enable(&pdev->dev);
Expand Down Expand Up @@ -1371,21 +1353,14 @@ static int __init sh_hdmi_probe(struct platform_device *pdev)

static int __exit sh_hdmi_remove(struct platform_device *pdev)
{
struct sh_mobile_hdmi_info *pdata = pdev->dev.platform_data;
struct sh_hdmi *hdmi = entity_to_sh_hdmi(platform_get_drvdata(pdev));
struct resource *res = platform_get_resource(pdev, IORESOURCE_MEM, 0);
struct sh_mobile_lcdc_board_cfg *board_cfg = &pdata->lcd_chan->board_cfg;
int irq = platform_get_irq(pdev, 0);

snd_soc_unregister_codec(&pdev->dev);

fb_unregister_client(&hdmi->notifier);

board_cfg->display_on = NULL;
board_cfg->display_off = NULL;
board_cfg->board_data = NULL;
board_cfg->owner = NULL;

/* No new work will be scheduled, wait for running ISR */
free_irq(irq, hdmi);
/* Wait for already scheduled work */
Expand Down

0 comments on commit 0abecee

Please sign in to comment.