diff mbox

[1/6] PCI: use pci_is_root_bus() in acpi_pci_get_birdge_handle()

Message ID 4A1B94A2.8030906@jp.fujitsu.com (mailing list archive)
State Accepted, archived
Delegated to: Jesse Barnes
Headers show

Commit Message

Kenji Kaneshige May 26, 2009, 7:05 a.m. UTC
Use pci_is_root_bus() in acpi_pci_get_bridge_handle() to check if the
pci bus is root, for code consistency.

Signed-off-by: Kenji Kaneshige <kaneshige.kenji@jp.fujitsu.com>

---
 include/linux/pci-acpi.h |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)



--
To unsubscribe from this list: send the line "unsubscribe linux-pci" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Comments

Jesse Barnes June 11, 2009, 6:46 p.m. UTC | #1
On Tue, 26 May 2009 16:05:06 +0900
Kenji Kaneshige <kaneshige.kenji@jp.fujitsu.com> wrote:

> Use pci_is_root_bus() in acpi_pci_get_bridge_handle() to check if the
> pci bus is root, for code consistency.
> 
> Signed-off-by: Kenji Kaneshige <kaneshige.kenji@jp.fujitsu.com>
> 
> ---
>  include/linux/pci-acpi.h |    2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> Index: 20090526/include/linux/pci-acpi.h
> ===================================================================
> --- 20090526.orig/include/linux/pci-acpi.h
> +++ 20090526/include/linux/pci-acpi.h
> @@ -23,7 +23,7 @@ static inline acpi_handle acpi_find_root
>  
>  static inline acpi_handle acpi_pci_get_bridge_handle(struct pci_bus
> *pbus) {
> -	if (pbus->parent)
> +	if (!pci_is_root_bus(pbus))
>  		return DEVICE_ACPI_HANDLE(&(pbus->self->dev));
>  	return acpi_get_pci_rootbridge_handle(pci_domain_nr(pbus),
>  					      pbus->number);
> 
> 

Applied this series to linux-next, thanks.
diff mbox

Patch

Index: 20090526/include/linux/pci-acpi.h
===================================================================
--- 20090526.orig/include/linux/pci-acpi.h
+++ 20090526/include/linux/pci-acpi.h
@@ -23,7 +23,7 @@  static inline acpi_handle acpi_find_root
 
 static inline acpi_handle acpi_pci_get_bridge_handle(struct pci_bus *pbus)
 {
-	if (pbus->parent)
+	if (!pci_is_root_bus(pbus))
 		return DEVICE_ACPI_HANDLE(&(pbus->self->dev));
 	return acpi_get_pci_rootbridge_handle(pci_domain_nr(pbus),
 					      pbus->number);