lkml.org 
[lkml]   [2010]   [Dec]   [17]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
SubjectRe: [PATCH 07/15] of: move of_irq_map_pci() into generic code
FromBenjamin Herrenschmidt <>
DateSat, 18 Dec 2010 08:16:37 +1100
On Fri, 2010-12-17 at 16:33 +0100, Sebastian Andrzej Siewior wrote:
> +
> +#if defined(CONFIG_PPC64) || defined(CONFIG_X86)
> +static struct device_node *pci_get_parent_node(struct pci_dev *pdev)
> +{
> + return pci_bus_to_OF_node(pdev->bus);
> +}
> +#endif
> +
> +#if defined(CONFIG_PPC32) || defined(CONFIG_MICROBLAZE)
> +static struct device_node *pci_get_parent_node(struct pci_dev *pdev)
> +{
> + struct pci_controller *host;
> +
> + host = pci_bus_to_host(pdev->bus);
> + return host ? host->dn : NULL;
> +}
> +#endif
> +

I'd like it better if instead you added pci_bus_to_OF_node() to ppc32
and microblaze.

The easy way to do so is to do:

struct pci_controller *host;

if (bus->self)
return pci_device_to_OF_node(bus->self);
host = pci_bus_to_host(pdev->bus);
return host ? host->dn : NULL;
Cheers,
Ben.




\
 
 \ /
  Last update: 2010-12-17 22:19    [from the cache]
©2003-2010