From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from acsinet15.oracle.com ([141.146.126.227]:31296 "EHLO acsinet15.oracle.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754061Ab2JBGdN (ORCPT ); Tue, 2 Oct 2012 02:33:13 -0400 From: Yinghai Lu To: Bjorn Helgaas Cc: linux-pci@vger.kernel.org, Yinghai Lu Subject: [PATCH 08/10] PCI: Add dev_is_pci_host_bridge() helper Date: Mon, 1 Oct 2012 23:33:06 -0700 Message-Id: <1349159588-15029-9-git-send-email-yinghai@kernel.org> In-Reply-To: <1349159588-15029-1-git-send-email-yinghai@kernel.org> References: <1349159588-15029-1-git-send-email-yinghai@kernel.org> Sender: linux-pci-owner@vger.kernel.org List-ID: Need to use it later for one function that is shared with pci device. Signed-off-by: Yinghai Lu --- include/linux/pci.h | 1 + 1 files changed, 1 insertions(+), 0 deletions(-) diff --git a/include/linux/pci.h b/include/linux/pci.h index 14703c5..7ee1028 100644 --- a/include/linux/pci.h +++ b/include/linux/pci.h @@ -739,6 +739,7 @@ void pci_stop_root_bus(struct pci_bus *bus); void pci_remove_root_bus(struct pci_bus *bus); void pci_setup_cardbus(struct pci_bus *bus); extern void pci_sort_breadthfirst(void); +#define dev_is_pci_host_bridge(d) ((d)->bus == &pci_host_bridge_bus_type) #define dev_is_pci(d) ((d)->bus == &pci_bus_type) #define dev_is_pf(d) ((dev_is_pci(d) ? to_pci_dev(d)->is_physfn : false)) #define dev_num_vf(d) ((dev_is_pci(d) ? pci_num_vf(to_pci_dev(d)) : 0)) -- 1.7.7