From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S933174Ab2GEOq1 (ORCPT ); Thu, 5 Jul 2012 10:46:27 -0400 Received: from smtp3.mundo-r.com ([212.51.32.191]:44523 "EHLO smtp4.mundo-r.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S932779Ab2GEOqX (ORCPT ); Thu, 5 Jul 2012 10:46:23 -0400 X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: Av4EANqn9U9bdWOb/2dsb2JhbABFhV+xR4EHghkBBSMECwFGECUCJgICVwcSiA+mepJWgSCPRYESA5U3iSaGXYJh X-IronPort-AV: E=Sophos;i="4.77,531,1336341600"; d="scan'208";a="926562638" From: =?UTF-8?q?Miguel=20G=C3=B3mez?= To: arnaud.patard@rtp-net.org, gregkh@linuxfoundation.org, aaro.koskinen@iki.fi, dan.carpenter@oracle.com Cc: devel@driverdev.osuosl.org, linux-kernel@vger.kernel.org, =?UTF-8?q?Miguel=20G=C3=B3mez?= Subject: [PATCH 03/19] Staging: xgifb: Remove LCDA detection in xgifb_probe(). Date: Thu, 5 Jul 2012 16:45:46 +0200 Message-Id: <3ffa5f5e2040eee2d485f3703f0855963bf23173.1341498465.git.magomez@igalia.com> X-Mailer: git-send-email 1.7.9.5 In-Reply-To: References: In-Reply-To: References: MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org The piece of code that checks for LCDA in xgifb_probe() just checks for some register values but doesn't really do anything in response to them (the actions that should be executed are commented). As nothing is really being done, the code can be safely removed. Signed-off-by: Miguel Gómez --- drivers/staging/xgifb/XGI_main_26.c | 30 ------------------------------ 1 file changed, 30 deletions(-) diff --git a/drivers/staging/xgifb/XGI_main_26.c b/drivers/staging/xgifb/XGI_main_26.c index 511890b..b3e8983 100644 --- a/drivers/staging/xgifb/XGI_main_26.c +++ b/drivers/staging/xgifb/XGI_main_26.c @@ -1942,36 +1942,6 @@ static int __devinit xgifb_probe(struct pci_dev *pdev, } } - if ((hw_info->ujVBChipID == VB_CHIP_302B) || - (hw_info->ujVBChipID == VB_CHIP_301LV) || - (hw_info->ujVBChipID == VB_CHIP_302LV)) { - int tmp; - tmp = xgifb_reg_get(XGICR, 0x34); - if (tmp <= 0x13) { - /* Currently on LCDA? - *(Some BIOSes leave CR38) */ - tmp = xgifb_reg_get(XGICR, 0x38); - if ((tmp & 0x03) == 0x03) { - /* XGI_Pr.XGI_UseLCDA = 1; */ - } else { - /* Currently on LCDA? - *(Some newer BIOSes set D0 in CR35) */ - tmp = xgifb_reg_get(XGICR, 0x35); - if (tmp & 0x01) { - /* XGI_Pr.XGI_UseLCDA = 1; */ - } else { - tmp = xgifb_reg_get(XGICR, - 0x30); - if (tmp & 0x20) { - tmp = xgifb_reg_get( - XGIPART1, 0x13); - } - } - } - } - - } - xgifb_info->mode_idx = -1; if (mode) -- 1.7.9.5