Skip to content

Commit

Permalink
powerpc/pci: Cleanup device dma setup code
Browse files Browse the repository at this point in the history
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>
Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
  • Loading branch information
Nishanth Aravamudan authored and Benjamin Herrenschmidt committed Oct 13, 2010
1 parent e72ed6b commit bc0df9e
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions arch/powerpc/kernel/pci-common.c
Original file line number Diff line number Diff line change
Expand Up @@ -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
*/
Expand All @@ -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 */
Expand Down

0 comments on commit bc0df9e

Please sign in to comment.