Patchwork [07/15] ppc: pci-common cleanup

login
register
mail settings
Submitter Nishanth Aravamudan
Date Sept. 15, 2010, 6:05 p.m.
Message ID <1284573958-8397-8-git-send-email-nacc@us.ibm.com>
Download mbox | patch
Permalink /patch/64866/
State Accepted
Commit bc0df9ec4c014dac85c0358f56be4223bf0f3334
Delegated to: Benjamin Herrenschmidt
Headers show

Comments

Nishanth Aravamudan - Sept. 15, 2010, 6:05 p.m.
Use set_dma_ops and remove unused oddly-named temp pointer sd.

Signed-off-by: Milton Miller <miltonm@bga.com>
Signed-off-by: Nishanth Aravamudan <nacc@us.ibm.com>
---
 arch/powerpc/kernel/pci-common.c |    4 +---
 1 files changed, 1 insertions(+), 3 deletions(-)
Grant Likely - Sept. 15, 2010, 6:30 p.m.
On Wed, Sep 15, 2010 at 12:05 PM, Nishanth Aravamudan <nacc@us.ibm.com> wrote:
> Use set_dma_ops and remove unused oddly-named temp pointer sd.
>
> Signed-off-by: Milton Miller <miltonm@bga.com>
> Signed-off-by: Nishanth Aravamudan <nacc@us.ibm.com>

Acked-by: Grant Likely <grant.likely@secretlab.ca>

> ---
>  arch/powerpc/kernel/pci-common.c |    4 +---
>  1 files changed, 1 insertions(+), 3 deletions(-)
>
> diff --git a/arch/powerpc/kernel/pci-common.c b/arch/powerpc/kernel/pci-common.c
> index 9021c4a..10a44e6 100644
> --- a/arch/powerpc/kernel/pci-common.c
> +++ b/arch/powerpc/kernel/pci-common.c
> @@ -1090,8 +1090,6 @@ void __devinit pcibios_setup_bus_devices(struct pci_bus *bus)
>                 bus->number, bus->self ? pci_name(bus->self) : "PHB");
>
>        list_for_each_entry(dev, &bus->devices, bus_list) {
> -               struct dev_archdata *sd = &dev->dev.archdata;
> -
>                /* Cardbus can call us to add new devices to a bus, so ignore
>                 * those who are already fully discovered
>                 */
> @@ -1107,7 +1105,7 @@ void __devinit pcibios_setup_bus_devices(struct pci_bus *bus)
>                set_dev_node(&dev->dev, pcibus_to_node(dev->bus));
>
>                /* Hook up default DMA ops */
> -               sd->dma_ops = pci_dma_ops;
> +               set_dma_ops(&dev->dev, pci_dma_ops);
>                set_dma_offset(&dev->dev, PCI_DRAM_OFFSET);
>
>                /* Additional platform DMA/iommu setup */
> --
> 1.7.0.4
>
>

Patch

diff --git a/arch/powerpc/kernel/pci-common.c b/arch/powerpc/kernel/pci-common.c
index 9021c4a..10a44e6 100644
--- a/arch/powerpc/kernel/pci-common.c
+++ b/arch/powerpc/kernel/pci-common.c
@@ -1090,8 +1090,6 @@  void __devinit pcibios_setup_bus_devices(struct pci_bus *bus)
 		 bus->number, bus->self ? pci_name(bus->self) : "PHB");
 
 	list_for_each_entry(dev, &bus->devices, bus_list) {
-		struct dev_archdata *sd = &dev->dev.archdata;
-
 		/* Cardbus can call us to add new devices to a bus, so ignore
 		 * those who are already fully discovered
 		 */
@@ -1107,7 +1105,7 @@  void __devinit pcibios_setup_bus_devices(struct pci_bus *bus)
 		set_dev_node(&dev->dev, pcibus_to_node(dev->bus));
 
 		/* Hook up default DMA ops */
-		sd->dma_ops = pci_dma_ops;
+		set_dma_ops(&dev->dev, pci_dma_ops);
 		set_dma_offset(&dev->dev, PCI_DRAM_OFFSET);
 
 		/* Additional platform DMA/iommu setup */