From f0308261b1dd5acba5c7e797159e60f94706df7d Mon Sep 17 00:00:00 2001 From: Yijing Wang Date: Thu, 5 Sep 2013 15:55:27 +0800 Subject: powerpc/pci: Use pci_is_pcie() to simplify code Use pci_is_pcie() to simplify code. Signed-off-by: Yijing Wang Signed-off-by: Bjorn Helgaas Acked-by: Kumar Gala Reviewed-by: Gavin Shan Cc: Gavin Shan Cc: Benjamin Herrenschmidt Cc: Paul Mackerras --- arch/powerpc/kernel/eeh.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'arch/powerpc/kernel') diff --git a/arch/powerpc/kernel/eeh.c b/arch/powerpc/kernel/eeh.c index 55593ee2d5aa..6ebbe545b7a5 100644 --- a/arch/powerpc/kernel/eeh.c +++ b/arch/powerpc/kernel/eeh.c @@ -189,8 +189,7 @@ static size_t eeh_gather_pci_data(struct eeh_dev *edev, char * buf, size_t len) } /* If PCI-E capable, dump PCI-E cap 10, and the AER */ - cap = pci_find_capability(dev, PCI_CAP_ID_EXP); - if (cap) { + if (pci_is_pcie(dev)) { n += scnprintf(buf+n, len-n, "pci-e cap10:\n"); printk(KERN_WARNING "EEH: PCI-E capabilities and status follow:\n"); -- cgit v1.2.3