aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/video
diff options
context:
space:
mode:
authorGuennadi Liakhovetski <g.liakhovetski@gmx.de>2011-01-07 06:58:03 -0500
committerPaul Mundt <lethal@linux-sh.org>2011-01-10 22:07:56 -0500
commit0d7fa180a8f314eaa4f766a852bf73abce4dbcc2 (patch)
tree645bca0e1bd7a1a4799e048d545f5fb6f42ed564 /drivers/video
parenteb0778bd3c1d4d29ffb7e13739463855d92965df (diff)
fbdev: sh_mobile_hdmi: simplify pointer handling
Signed-off-by: Guennadi Liakhovetski <g.liakhovetski@gmx.de> Signed-off-by: Paul Mundt <lethal@linux-sh.org>
Diffstat (limited to 'drivers/video')
-rw-r--r--drivers/video/sh_mobile_hdmi.c18
1 files changed, 9 insertions, 9 deletions
diff --git a/drivers/video/sh_mobile_hdmi.c b/drivers/video/sh_mobile_hdmi.c
index 46ab355e0a6a..e3eb77dfbf22 100644
--- a/drivers/video/sh_mobile_hdmi.c
+++ b/drivers/video/sh_mobile_hdmi.c
@@ -878,9 +878,9 @@ static int sh_hdmi_read_edid(struct sh_hdmi *hdmi, unsigned long *hdmi_rate,
878 * driver, and passing ->info with HDMI platform data. 878 * driver, and passing ->info with HDMI platform data.
879 */ 879 */
880 if (info && !found) { 880 if (info && !found) {
881 modelist = hdmi->info->modelist.next && 881 modelist = info->modelist.next &&
882 !list_empty(&hdmi->info->modelist) ? 882 !list_empty(&info->modelist) ?
883 list_entry(hdmi->info->modelist.next, 883 list_entry(info->modelist.next,
884 struct fb_modelist, list) : 884 struct fb_modelist, list) :
885 NULL; 885 NULL;
886 886
@@ -1123,6 +1123,7 @@ static void sh_hdmi_edid_work_fn(struct work_struct *work)
1123 mutex_lock(&hdmi->mutex); 1123 mutex_lock(&hdmi->mutex);
1124 1124
1125 if (hdmi->hp_state == HDMI_HOTPLUG_CONNECTED) { 1125 if (hdmi->hp_state == HDMI_HOTPLUG_CONNECTED) {
1126 struct fb_info *info = hdmi->info;
1126 unsigned long parent_rate = 0, hdmi_rate; 1127 unsigned long parent_rate = 0, hdmi_rate;
1127 1128
1128 /* A device has been plugged in */ 1129 /* A device has been plugged in */
@@ -1144,22 +1145,21 @@ static void sh_hdmi_edid_work_fn(struct work_struct *work)
1144 /* Switched to another (d) power-save mode */ 1145 /* Switched to another (d) power-save mode */
1145 msleep(10); 1146 msleep(10);
1146 1147
1147 if (!hdmi->info) 1148 if (!info)
1148 goto out; 1149 goto out;
1149 1150
1150 ch = hdmi->info->par; 1151 ch = info->par;
1151 1152
1152 acquire_console_sem(); 1153 acquire_console_sem();
1153 1154
1154 /* HDMI plug in */ 1155 /* HDMI plug in */
1155 if (!sh_hdmi_must_reconfigure(hdmi) && 1156 if (!sh_hdmi_must_reconfigure(hdmi) &&
1156 hdmi->info->state == FBINFO_STATE_RUNNING) { 1157 info->state == FBINFO_STATE_RUNNING) {
1157 /* 1158 /*
1158 * First activation with the default monitor - just turn 1159 * First activation with the default monitor - just turn
1159 * on, if we run a resume here, the logo disappears 1160 * on, if we run a resume here, the logo disappears
1160 */ 1161 */
1161 if (lock_fb_info(hdmi->info)) { 1162 if (lock_fb_info(info)) {
1162 struct fb_info *info = hdmi->info;
1163 info->var.width = hdmi->var.width; 1163 info->var.width = hdmi->var.width;
1164 info->var.height = hdmi->var.height; 1164 info->var.height = hdmi->var.height;
1165 sh_hdmi_display_on(hdmi, info); 1165 sh_hdmi_display_on(hdmi, info);
@@ -1167,7 +1167,7 @@ static void sh_hdmi_edid_work_fn(struct work_struct *work)
1167 } 1167 }
1168 } else { 1168 } else {
1169 /* New monitor or have to wake up */ 1169 /* New monitor or have to wake up */
1170 fb_set_suspend(hdmi->info, 0); 1170 fb_set_suspend(info, 0);
1171 } 1171 }
1172 1172
1173 release_console_sem(); 1173 release_console_sem();