Received: by 2002:a25:c593:0:0:0:0:0 with SMTP id v141csp4624924ybe; Mon, 16 Sep 2019 15:45:42 -0700 (PDT) X-Google-Smtp-Source: APXvYqwyc+kRBJvKUHI73b0DaE09Y2cJvFb+XTDzyjvpyPxvDIYLDLRFRd8U7kylJGLMhluHNMiO X-Received: by 2002:a17:906:6818:: with SMTP id k24mr2085844ejr.271.1568673942712; Mon, 16 Sep 2019 15:45:42 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1568673942; cv=none; d=google.com; s=arc-20160816; b=K37lAWlVwlv5RU07g1atNIVtaRPYiE8eGLupmQBf0lVkdb1n+XSZYr/KFKAwHzpRJR JlFJ82cQqzuksCHyBuBQx+ouKr13RvqT+j8d+ToGouwkyql18SRa7ZDEGgeOtYuxir4C eEzIRXdni/AXqnfYei6Gf0ao4xGXzE9OnsMpHedTKNZWn8YBcO8ZJacifVgvHpOHqbNM rpCMIgSu+1C3BklqoK9blt3kJfaMH9Axa+FY05sN083oGn6ckVl8A3GXvljeol5jgiwt OA8fiUhdfU7eUM7D6seeIIkM0xn2VZozAnK/7U0u3MTfh9/Vlj/Hsttr46nSHxIqc2YN rELQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from; bh=52Ok3SbrITEZp2+/epaFkzm4cA6Xg3yiQs6lhoB6dtE=; b=tj8KQ9Q4phXtHv/8PR5GbX3ngwtj0skWPscNiHVqnUhb2o9itOIcLAyoXxLH5VtAk4 YnNjFmLJ4FCMouDsMXvOEDaz3jOJnC0TRN8u5QsCITyHlcap4pfdftNj4awcNbevd2GD SHR+MxwgfPk/bSnfxB+AbA72lrKhkCfgkYbrJFYxdoTPn5c65Q1szhHnC+qRS6Lj5Ge3 3DZ8b3/N2ir7mZF+vthbl0BF/AQxh8JF5zhhFhqwc79SSQ2rvtXYp+40DMIgoRWFzZRm fJPCDW1SsFsqSj863YQalS2PmRL40Abf426/SzYP6gJHmUtmbxA73zVRV2T+/ekKlVRr 0gTw== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id y16si155839eje.248.2019.09.16.15.45.19; Mon, 16 Sep 2019 15:45:42 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2391709AbfIPUrx (ORCPT + 99 others); Mon, 16 Sep 2019 16:47:53 -0400 Received: from mail-wm1-f66.google.com ([209.85.128.66]:34066 "EHLO mail-wm1-f66.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2391687AbfIPUrw (ORCPT ); Mon, 16 Sep 2019 16:47:52 -0400 Received: by mail-wm1-f66.google.com with SMTP id y135so871409wmc.1; Mon, 16 Sep 2019 13:47:50 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=52Ok3SbrITEZp2+/epaFkzm4cA6Xg3yiQs6lhoB6dtE=; b=QmsRC2A8rWI/D2+psCaMFTL1158kKui/MBsjBR58T+JdQxzO46kpmZD0gNZASTt1Su FRfLbAhaaXZvwNJBBuY9Ek/0YgdRycz7TJT7OrBL88RYtoJ3Rropdy0IEfhkbpsDtzxA CtL2mLD5WJbpDYLuenOieIYXjTixnzapYY0qS3ZZVY4WRsgwDzUwPkMBwqdb/O50gvJz bBzNBgJUhQDFjrusqKUCdvo6Mdh53m2fw0zMld/z9IbRD9qoQ0Oaa7S98seYgT/PMP/y A9CJ9sMFBdgdCqEB4L3622CaPT1DlbPmBoIJHlCRkugpMyfHHgl3tAAcetT9nlUHfQfy jMEw== X-Gm-Message-State: APjAAAUMagXesZsU+yNwgfK8C4AVifxWE4RM0CEvdbV3jnSCMYXFKl1d jwgwfJxxp6cD9gBVkdfiabA= X-Received: by 2002:a1c:7c0b:: with SMTP id x11mr675946wmc.92.1568666869752; Mon, 16 Sep 2019 13:47:49 -0700 (PDT) Received: from black.home (broadband-188-32-48-208.ip.moscow.rt.ru. [188.32.48.208]) by smtp.googlemail.com with ESMTPSA id x6sm231437wmf.38.2019.09.16.13.47.48 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 16 Sep 2019 13:47:49 -0700 (PDT) From: Denis Efremov To: Bjorn Helgaas Cc: Denis Efremov , linux-kernel@vger.kernel.org, linux-pci@vger.kernel.org, Andrew Murray , linux-usb@vger.kernel.org, Mathias Nyman , Greg Kroah-Hartman Subject: [PATCH v3 25/26] usb: pci-quirks: Use PCI_STD_NUM_BARS Date: Mon, 16 Sep 2019 23:41:57 +0300 Message-Id: <20190916204158.6889-26-efremov@linux.com> X-Mailer: git-send-email 2.21.0 In-Reply-To: <20190916204158.6889-1-efremov@linux.com> References: <20190916204158.6889-1-efremov@linux.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Use define PCI_STD_NUM_BARS instead of PCI_ROM_RESOURCE for the number of PCI BARs. Cc: Mathias Nyman Cc: Greg Kroah-Hartman Signed-off-by: Denis Efremov --- drivers/usb/host/pci-quirks.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/usb/host/pci-quirks.c b/drivers/usb/host/pci-quirks.c index f6d04491df60..6c7f0a876b96 100644 --- a/drivers/usb/host/pci-quirks.c +++ b/drivers/usb/host/pci-quirks.c @@ -728,7 +728,7 @@ static void quirk_usb_handoff_uhci(struct pci_dev *pdev) if (!pio_enabled(pdev)) return; - for (i = 0; i < PCI_ROM_RESOURCE; i++) + for (i = 0; i < PCI_STD_NUM_BARS; i++) if ((pci_resource_flags(pdev, i) & IORESOURCE_IO)) { base = pci_resource_start(pdev, i); break; -- 2.21.0