From patchwork Fri Apr 15 15:24:05 2011 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Sergei Shtylyov X-Patchwork-Id: 91390 X-Patchwork-Delegate: davem@davemloft.net Return-Path: X-Original-To: patchwork-incoming@ozlabs.org Delivered-To: patchwork-incoming@ozlabs.org Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by ozlabs.org (Postfix) with ESMTP id 37FD7B6EF7 for ; Sat, 16 Apr 2011 01:26:16 +1000 (EST) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1756242Ab1DOPZw (ORCPT ); Fri, 15 Apr 2011 11:25:52 -0400 Received: from mail.dev.rtsoft.ru ([213.79.90.226]:60049 "HELO mail.dev.rtsoft.ru" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with SMTP id S1755432Ab1DOPZu (ORCPT ); Fri, 15 Apr 2011 11:25:50 -0400 Received: (qmail 11080 invoked from network); 15 Apr 2011 15:25:49 -0000 Received: from unknown (HELO wasted.dev.rtsoft.ru) (192.168.1.70) by 0 with SMTP; 15 Apr 2011 15:25:49 -0000 To: netdev@vger.kernel.org Subject: [PATCH 1/2] iwlegacy: use pci_dev->revision Content-Disposition: inline Cc: linville@tuxdriver.com, linux-wireless@vger.kernel.org From: Sergei Shtylyov Organization: MontaVista Software Inc. Date: Fri, 15 Apr 2011 19:24:05 +0400 MIME-Version: 1.0 Message-Id: <201104151924.05645.sshtylyov@ru.mvista.com> Sender: netdev-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: netdev@vger.kernel.org Commit be663ab67077fac8e23eb8e231a8c1c94cb32e54 (iwlwifi: split the drivers for agn and legacy devices 3945/4965) added code to read the 4965's revision ID from the PCI configuration register while it's already stored by PCI subsystem in the 'revision' field of 'struct pci_dev'... Signed-off-by: Sergei Shtylyov --- The patch is against the recent Linus' tree. Resending with proper patch numbering... drivers/net/wireless/iwlegacy/iwl4965-base.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) -- To unsubscribe from this list: send the line "unsubscribe netdev" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Index: linux-2.6/drivers/net/wireless/iwlegacy/iwl4965-base.c =================================================================== --- linux-2.6.orig/drivers/net/wireless/iwlegacy/iwl4965-base.c +++ linux-2.6/drivers/net/wireless/iwlegacy/iwl4965-base.c @@ -3179,7 +3179,7 @@ static void iwl4965_hw_detect(struct iwl { priv->hw_rev = _iwl_legacy_read32(priv, CSR_HW_REV); priv->hw_wa_rev = _iwl_legacy_read32(priv, CSR_HW_REV_WA_REG); - pci_read_config_byte(priv->pci_dev, PCI_REVISION_ID, &priv->rev_id); + priv->rev_id = priv->pci_dev->revision; IWL_DEBUG_INFO(priv, "HW Revision ID = 0x%X\n", priv->rev_id); }