Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S932519Ab3ICHgG (ORCPT ); Tue, 3 Sep 2013 03:36:06 -0400 Received: from szxga02-in.huawei.com ([119.145.14.65]:18808 "EHLO szxga02-in.huawei.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S932481Ab3ICHgC (ORCPT ); Tue, 3 Sep 2013 03:36:02 -0400 From: Yijing Wang To: Benjamin Herrenschmidt , Gavin Shan , Bjorn Helgaas , "James E.J. Bottomley" , "David S. Miller" CC: , , Yijing Wang , Hanjun Guo Subject: [PATCH 6/7] PCI: use pci_is_pcie() to simplify code Date: Tue, 3 Sep 2013 15:35:14 +0800 Message-ID: <1378193715-25328-6-git-send-email-wangyijing@huawei.com> X-Mailer: git-send-email 1.7.11.msysgit.1 In-Reply-To: <1378193715-25328-1-git-send-email-wangyijing@huawei.com> References: <1378193715-25328-1-git-send-email-wangyijing@huawei.com> MIME-Version: 1.0 Content-Type: text/plain X-Originating-IP: [10.135.76.69] X-CFilter-Loop: Reflected Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 817 Lines: 31 Use pci_is_pcie() instead of pci_find_capability to simplify code. Signed-off-by: Yijing Wang --- drivers/pci/probe.c | 3 +-- 1 files changed, 1 insertions(+), 2 deletions(-) diff --git a/drivers/pci/probe.c b/drivers/pci/probe.c index eeb50bd..0fa9075 100644 --- a/drivers/pci/probe.c +++ b/drivers/pci/probe.c @@ -641,8 +641,7 @@ static void pci_set_bus_speed(struct pci_bus *bus) return; } - pos = pci_find_capability(bridge, PCI_CAP_ID_EXP); - if (pos) { + if (pci_is_pcie(bridge)) { u32 linkcap; u16 linksta; -- 1.7.1 -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/