[PATCH 01/15] PCI: introduce pci_device_to_OF_node() for !CONFIG_OF

Bjorn Helgaas bhelgaas at google.com
Tue Feb 3 02:47:57 AEDT 2015


On Sun, Feb 1, 2015 at 8:28 PM, Michael Ellerman <mpe at ellerman.id.au> wrote:
> On Sat, 2015-01-31 at 21:47 +0800, Kevin Hao wrote:
>> So we can avoid the ugly #ifdef in some drivers.
>>
>> Signed-off-by: Kevin Hao <haokexin at gmail.com>
>> ---
>>  include/linux/pci.h | 2 ++
>>  1 file changed, 2 insertions(+)
>
>
> Hi Bjorn,
>
> Do you mind putting this into your next for 3.20? Or giving us an ACK for it if
> you prefer.

I think it makes more sense to merge this along with the other 14
patches that remove the #ifdefs (at least, I assume that's what they
do; I haven't seen them).

Acked-by: Bjorn Helgaas <bhelgaas at google.com>

But please edit the subject line so it is capitalized consistently
with the rest of the history.  And it'd be nice if the changelog were
a complete sentence all by itself, e.g.,

    PCI: Add pci_device_to_OF_node() stub for !CONFIG_OF

    Add a stub for pci_device_to_OF_node() so drivers don't need to use
    #ifdef CONFIG_OF around calls to it.

Bjorn

>> diff --git a/include/linux/pci.h b/include/linux/pci.h
>> index 8323cbf93913..421eb6a9e600 100644
>> --- a/include/linux/pci.h
>> +++ b/include/linux/pci.h
>> @@ -1863,6 +1863,8 @@ static inline void pci_set_of_node(struct pci_dev *dev) { }
>>  static inline void pci_release_of_node(struct pci_dev *dev) { }
>>  static inline void pci_set_bus_of_node(struct pci_bus *bus) { }
>>  static inline void pci_release_bus_of_node(struct pci_bus *bus) { }
>> +static inline struct device_node *
>> +pci_device_to_OF_node(const struct pci_dev *pdev) { return NULL; }
>>  #endif  /* CONFIG_OF */
>>
>>  #ifdef CONFIG_EEH
>
>
> --
> To unsubscribe from this list: send the line "unsubscribe linux-pci" in
> the body of a message to majordomo at vger.kernel.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html


More information about the Linuxppc-dev mailing list