Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 230500
b: refs/heads/master
c: eb0778b
h: refs/heads/master
v: v3
  • Loading branch information
Guennadi Liakhovetski authored and Paul Mundt committed Jan 11, 2011
1 parent b477ed0 commit d497048
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 11 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: c7321d6f88e1f962d605923a93f9c255e4d0b8c9
refs/heads/master: eb0778bd3c1d4d29ffb7e13739463855d92965df
19 changes: 9 additions & 10 deletions trunk/drivers/video/sh_mobile_hdmi.c
Original file line number Diff line number Diff line change
Expand Up @@ -221,6 +221,7 @@ struct sh_hdmi {
struct delayed_work edid_work;
struct fb_var_screeninfo var;
struct fb_monspecs monspec;
struct notifier_block notifier;
};

static void hdmi_write(struct sh_hdmi *hdmi, u8 data, u8 reg)
Expand Down Expand Up @@ -1196,13 +1197,6 @@ static void sh_hdmi_edid_work_fn(struct work_struct *work)
dev_dbg(hdmi->dev, "%s(%p): end\n", __func__, pdata->lcd_dev);
}

static int sh_hdmi_notify(struct notifier_block *nb,
unsigned long action, void *data);

static struct notifier_block sh_hdmi_notifier = {
.notifier_call = sh_hdmi_notify,
};

static int sh_hdmi_notify(struct notifier_block *nb,
unsigned long action, void *data)
{
Expand All @@ -1212,7 +1206,7 @@ static int sh_hdmi_notify(struct notifier_block *nb,
struct sh_mobile_lcdc_board_cfg *board_cfg = &ch->cfg.board_cfg;
struct sh_hdmi *hdmi = board_cfg->board_data;

if (nb != &sh_hdmi_notifier || !hdmi || hdmi->info != info)
if (!hdmi || nb != &hdmi->notifier || hdmi->info != info)
return NOTIFY_DONE;

switch(action) {
Expand All @@ -1231,11 +1225,11 @@ static int sh_hdmi_notify(struct notifier_block *nb,
* temporarily, synchronise with the work queue and re-acquire
* the info->lock.
*/
unlock_fb_info(hdmi->info);
unlock_fb_info(info);
mutex_lock(&hdmi->mutex);
hdmi->info = NULL;
mutex_unlock(&hdmi->mutex);
lock_fb_info(hdmi->info);
lock_fb_info(info);
return NOTIFY_OK;
}
return NOTIFY_DONE;
Expand Down Expand Up @@ -1333,6 +1327,9 @@ static int __init sh_hdmi_probe(struct platform_device *pdev)
goto ecodec;
}

hdmi->notifier.notifier_call = sh_hdmi_notify;
fb_register_client(&hdmi->notifier);

return 0;

ecodec:
Expand Down Expand Up @@ -1363,6 +1360,8 @@ static int __exit sh_hdmi_remove(struct platform_device *pdev)

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;
Expand Down

0 comments on commit d497048

Please sign in to comment.