lkml.org 
[lkml]   [2011]   [Feb]   [22]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
Date
From
SubjectRe: [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/

\
 
 \ /
  Last update: 2011-02-22 12:27    [W:0.069 / U:1.960 seconds]
©2003-2018 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site