[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <1292620597.16694.541.camel@pasglop>
Date: Sat, 18 Dec 2010 08:16:37 +1100
From: Benjamin Herrenschmidt <benh@...nel.crashing.org>
To: Sebastian Andrzej Siewior <bigeasy@...utronix.de>
Cc: linux-kernel@...r.kernel.org, sodaville@...utronix.de,
x86@...nel.org, dirk.brandewie@...il.com,
Sebastian Andrzej Siewior <sebastian@...akpoint.cc>,
devicetree-discuss@...ts.ozlabs.org
Subject: Re: [PATCH 07/15] of: move of_irq_map_pci() into generic code
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.
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists