From patchwork Thu Jan 6 18:24:02 2011 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Guennadi Liakhovetski X-Patchwork-Id: 460141 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 p06INran015393 for ; Thu, 6 Jan 2011 18:24:06 GMT Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752704Ab1AFSYE (ORCPT ); Thu, 6 Jan 2011 13:24:04 -0500 Received: from moutng.kundenserver.de ([212.227.17.9]:61037 "EHLO moutng.kundenserver.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751686Ab1AFSYE (ORCPT ); Thu, 6 Jan 2011 13:24:04 -0500 Received: from axis700.grange (pD9EB8D9E.dip0.t-ipconnect.de [217.235.141.158]) by mrelayeu.kundenserver.de (node=mreu2) with ESMTP (Nemesis) id 0LnG25-1QG29f2AEX-00h1Xt; Thu, 06 Jan 2011 19:24:02 +0100 Received: by axis700.grange (Postfix, from userid 1000) id 3D83B189B93; Thu, 6 Jan 2011 19:24:02 +0100 (CET) Received: from localhost (localhost [127.0.0.1]) by axis700.grange (Postfix) with ESMTP id 3B4CB189B8D; Thu, 6 Jan 2011 19:24:02 +0100 (CET) Date: Thu, 6 Jan 2011 19:24:02 +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] fbdev: sh_mobile_hdmi: simplify pointer handling In-Reply-To: Message-ID: References: MIME-Version: 1.0 X-Provags-ID: V02:K0:V1GmNhIHTS56m4cuM/fXVgEc2AEFGN694iu04jvkk3f VGVDIwe339fX+4pOs9aZ/b9jhCw3ol6WbJH6zt7VDvmgdTS4gx Q4j1VHxKIvpMweCU1a+3+MzJWuFWHfX0RxPMMYyJeia2ks0iWq CCR+RJBmWTFGady5A2BrfFzECXYDzvnIGTi5Pdp1hHUNcobM5q QemKmoAftlcIHWAwDgiHa1EKUiTZ4EoUWhMYDdCljc= 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]); Thu, 06 Jan 2011 18:24:07 +0000 (UTC) diff --git a/drivers/video/sh_mobile_hdmi.c b/drivers/video/sh_mobile_hdmi.c index 4a1f3f4..ac7e5d8 100644 --- a/drivers/video/sh_mobile_hdmi.c +++ b/drivers/video/sh_mobile_hdmi.c @@ -821,9 +821,9 @@ static int sh_hdmi_read_edid(struct sh_hdmi *hdmi) * 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; @@ -1055,6 +1055,7 @@ static void sh_hdmi_edid_work_fn(struct work_struct *work) mutex_lock(&hdmi->mutex); if (hdmi->hp_state == HDMI_HOTPLUG_EDID_DONE) { + struct fb_info *info = hdmi->info; /* A device has been plugged in */ pm_runtime_get_sync(hdmi->dev); @@ -1073,22 +1074,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); @@ -1096,7 +1096,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();