From patchwork Fri Jan 7 11:58:03 2011 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Guennadi Liakhovetski X-Patchwork-Id: 463611 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by demeter1.kernel.org (8.14.4/8.14.3) with ESMTP id p07BvoG5011068 for ; Fri, 7 Jan 2011 11:58:06 GMT Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752086Ab1AGL6G (ORCPT ); Fri, 7 Jan 2011 06:58:06 -0500 Received: from moutng.kundenserver.de ([212.227.17.9]:51868 "EHLO moutng.kundenserver.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751618Ab1AGL6F (ORCPT ); Fri, 7 Jan 2011 06:58:05 -0500 Received: from axis700.grange (pD9EB8C9B.dip0.t-ipconnect.de [217.235.140.155]) by mrelayeu.kundenserver.de (node=mrbap0) with ESMTP (Nemesis) id 0MCOfZ-1PScFW1Pyz-0096Bj; Fri, 07 Jan 2011 12:58:03 +0100 Received: by axis700.grange (Postfix, from userid 1000) id 0E014E6A76; Fri, 7 Jan 2011 12:58:03 +0100 (CET) Received: from localhost (localhost [127.0.0.1]) by axis700.grange (Postfix) with ESMTP id 0BDD9106741; Fri, 7 Jan 2011 12:58:03 +0100 (CET) Date: Fri, 7 Jan 2011 12:58:03 +0100 (CET) From: Guennadi Liakhovetski X-X-Sender: lyakh@axis700.grange To: linux-sh@vger.kernel.org cc: linux-fbdev@vger.kernel.org Subject: [PATCH 3/3 v2] fbdev: sh_mobile_hdmi: simplify pointer handling In-Reply-To: Message-ID: References: MIME-Version: 1.0 X-Provags-ID: V02:K0:8sQiUxeXwfnKuh6Xu03VcEmIiTtXZROU+wciHglhGwe r1KdnuTmJmTEDXZ4NEC49ma41n41iPuTbBRHVFJIRiFsmzqtBQ G/9Ol71R2vdUow0vgSvrqO/XvVEHr77MXvNC2q9APir2A6oFAJ tkYWH5oZJMyPXardl3rnmrkowCgqE2jos2gFP+D+MVjDWTqD+L An/Jii5zEr/3IL2m5NiJC6Pcz78oA3ifhTSZTUymT8= Sender: linux-fbdev-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-fbdev@vger.kernel.org X-Greylist: IP, sender and recipient auto-whitelisted, not delayed by milter-greylist-4.2.6 (demeter1.kernel.org [140.211.167.41]); Fri, 07 Jan 2011 11:58:07 +0000 (UTC) diff --git a/drivers/video/sh_mobile_hdmi.c b/drivers/video/sh_mobile_hdmi.c index 46ab355..e3eb77d 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, * driver, and passing ->info with HDMI platform data. */ if (info && !found) { - modelist = hdmi->info->modelist.next && - !list_empty(&hdmi->info->modelist) ? - list_entry(hdmi->info->modelist.next, + modelist = info->modelist.next && + !list_empty(&info->modelist) ? + list_entry(info->modelist.next, struct fb_modelist, list) : NULL; @@ -1123,6 +1123,7 @@ static void sh_hdmi_edid_work_fn(struct work_struct *work) mutex_lock(&hdmi->mutex); if (hdmi->hp_state == HDMI_HOTPLUG_CONNECTED) { + struct fb_info *info = hdmi->info; unsigned long parent_rate = 0, hdmi_rate; /* A device has been plugged in */ @@ -1144,22 +1145,21 @@ static void sh_hdmi_edid_work_fn(struct work_struct *work) /* Switched to another (d) power-save mode */ msleep(10); - if (!hdmi->info) + if (!info) goto out; - ch = hdmi->info->par; + ch = info->par; acquire_console_sem(); /* HDMI plug in */ if (!sh_hdmi_must_reconfigure(hdmi) && - hdmi->info->state == FBINFO_STATE_RUNNING) { + info->state == FBINFO_STATE_RUNNING) { /* * First activation with the default monitor - just turn * on, if we run a resume here, the logo disappears */ - if (lock_fb_info(hdmi->info)) { - struct fb_info *info = hdmi->info; + if (lock_fb_info(info)) { info->var.width = hdmi->var.width; info->var.height = hdmi->var.height; sh_hdmi_display_on(hdmi, info); @@ -1167,7 +1167,7 @@ static void sh_hdmi_edid_work_fn(struct work_struct *work) } } else { /* New monitor or have to wake up */ - fb_set_suspend(hdmi->info, 0); + fb_set_suspend(info, 0); } release_console_sem();