From 423b4cf67531031eb6467994183c34314c8e4a8e Mon Sep 17 00:00:00 2001 From: Laurent Pinchart Date: Thu, 24 Nov 2011 11:53:47 +0100 Subject: [PATCH] --- yaml --- r: 294227 b: refs/heads/master c: 12ee2502c0503c484a7df052d356e39c40b02400 h: refs/heads/master i: 294225: a74f908e9622fdef90015ec390d70e4b809ac014 294223: efba9fcf770d9171d0d4ff00a0dc537689d8b660 v: v3 --- [refs] | 2 +- trunk/drivers/video/sh_mobile_hdmi.c | 8 ++++---- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/[refs] b/[refs] index c98ab516777a..27798a2fee4c 100644 --- a/[refs] +++ b/[refs] @@ -1,2 +1,2 @@ --- -refs/heads/master: 37c5dcc21ddaa9f946c4d691996bb3076598b813 +refs/heads/master: 12ee2502c0503c484a7df052d356e39c40b02400 diff --git a/trunk/drivers/video/sh_mobile_hdmi.c b/trunk/drivers/video/sh_mobile_hdmi.c index 647ba984f00f..a77bbc3e9e13 100644 --- a/trunk/drivers/video/sh_mobile_hdmi.c +++ b/trunk/drivers/video/sh_mobile_hdmi.c @@ -225,6 +225,8 @@ struct sh_hdmi { struct notifier_block notifier; }; +#define notifier_to_hdmi(n) container_of(n, struct sh_hdmi, notifier) + static void hdmi_write(struct sh_hdmi *hdmi, u8 data, u8 reg) { iowrite8(data, hdmi->base + reg); @@ -1204,11 +1206,9 @@ static int sh_hdmi_notify(struct notifier_block *nb, { struct fb_event *event = data; struct fb_info *info = event->info; - struct sh_mobile_lcdc_chan *ch = info->par; - struct sh_mobile_lcdc_board_cfg *board_cfg = &ch->cfg.board_cfg; - struct sh_hdmi *hdmi = board_cfg->board_data; + struct sh_hdmi *hdmi = notifier_to_hdmi(nb); - if (!hdmi || nb != &hdmi->notifier || hdmi->info != info) + if (hdmi->info != info) return NOTIFY_DONE; switch(action) {