Messages in this thread Patch in this message | | | Date | Tue, 22 Feb 2011 12:21:23 +0100 | From | Sebastian Andrzej Siewior <> | Subject | Re: [sodaville] [PATCH TIP 08/14] x86/dtb: add support for PCI devices backed by dtb nodes |
| |
* Grant Likely | 2011-02-16 14:59:15 [-0700]:
>> diff --git a/arch/x86/include/asm/prom.h b/arch/x86/include/asm/prom.h >> index bd67ab2..3ed0bd6 100644 >> --- a/arch/x86/include/asm/prom.h >> +++ b/arch/x86/include/asm/prom.h >> @@ -28,8 +29,24 @@ extern void add_dtb(u64 data); >> void x86_dtb_find_config(void); >> void x86_dtb_get_config(unsigned int unused); >> void add_interrupt_host(struct irq_domain *ih); >> +void __cpuinit x86_of_pci_init(void); >> + >> +static inline struct device_node *pci_device_to_OF_node(struct pci_dev *pdev) >> +{ >> + return pdev->dev.of_node; >> +} >> + >> +static inline struct device_node *pci_bus_to_OF_node(struct pci_bus *bus) >> +{ >> + if (bus->self) >> + return pci_device_to_OF_node(bus->self); >> + else >> + return NULL; >> +} > >Nit: could simply be: > >static inline struct device_node *pci_device_to_OF_node(struct pci_dev *pdev) >{ > return pdev ? pdev->dev.of_node : NULL; >} > >static inline struct device_node *pci_bus_to_OF_node(struct pci_bus *bus) >{ > return pci_device_to_OF_node(bus->self); >} > done.
Sebastian -- 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/
| |