Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1763572Ab3IEIAe (ORCPT ); Thu, 5 Sep 2013 04:00:34 -0400 Received: from szxga02-in.huawei.com ([119.145.14.65]:34820 "EHLO szxga02-in.huawei.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1757164Ab3IEIAb (ORCPT ); Thu, 5 Sep 2013 04:00:31 -0400 From: Yijing Wang To: Benjamin Herrenschmidt , Bjorn Helgaas , "James E.J. Bottomley" CC: Gavin Shan , , , Yijing Wang , Hanjun Guo Subject: [PATCH v2 5/6] PCI: use pci_is_pcie() to simplify code Date: Thu, 5 Sep 2013 15:55:29 +0800 Message-ID: <1378367730-25996-5-git-send-email-wangyijing@huawei.com> X-Mailer: git-send-email 1.7.11.msysgit.1 In-Reply-To: <1378367730-25996-1-git-send-email-wangyijing@huawei.com> References: <1378367730-25996-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/