diff options
author | Bart Van Assche <bart.vanassche@sandisk.com> | 2017-01-20 13:04:02 -0800 |
---|---|---|
committer | Doug Ledford <dledford@redhat.com> | 2017-01-24 12:23:35 -0500 |
commit | 5657933dbb6e25feaf5d8df8c88f96cdade693a3 (patch) | |
tree | c08ad2e62db7f394abe3dc324d954129c2e2e34f /arch/mips | |
parent | 5299709d0a87342dadc1fc9850484fadeb488bf8 (diff) | |
download | talos-op-linux-5657933dbb6e25feaf5d8df8c88f96cdade693a3.tar.gz talos-op-linux-5657933dbb6e25feaf5d8df8c88f96cdade693a3.zip |
treewide: Move dma_ops from struct dev_archdata into struct device
Some but not all architectures provide set_dma_ops(). Move dma_ops
from struct dev_archdata into struct device such that it becomes
possible on all architectures to configure dma_ops per device.
Signed-off-by: Bart Van Assche <bart.vanassche@sandisk.com>
Acked-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Cc: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Cc: Boris Ostrovsky <boris.ostrovsky@oracle.com>
Cc: David Woodhouse <dwmw2@infradead.org>
Cc: Juergen Gross <jgross@suse.com>
Cc: H. Peter Anvin <hpa@zytor.com>
Cc: Ingo Molnar <mingo@redhat.com>
Cc: linux-arch@vger.kernel.org
Cc: linux-kernel@vger.kernel.org
Cc: Russell King <linux@armlinux.org.uk>
Cc: x86@kernel.org
Signed-off-by: Doug Ledford <dledford@redhat.com>
Diffstat (limited to 'arch/mips')
-rw-r--r-- | arch/mips/include/asm/device.h | 5 | ||||
-rw-r--r-- | arch/mips/include/asm/dma-mapping.h | 4 | ||||
-rw-r--r-- | arch/mips/pci/pci-octeon.c | 2 |
3 files changed, 3 insertions, 8 deletions
diff --git a/arch/mips/include/asm/device.h b/arch/mips/include/asm/device.h index ebc5c1265473..6aa796f1081a 100644 --- a/arch/mips/include/asm/device.h +++ b/arch/mips/include/asm/device.h @@ -6,12 +6,7 @@ #ifndef _ASM_MIPS_DEVICE_H #define _ASM_MIPS_DEVICE_H -struct dma_map_ops; - struct dev_archdata { - /* DMA operations on that device */ - const struct dma_map_ops *dma_ops; - #ifdef CONFIG_DMA_PERDEV_COHERENT /* Non-zero if DMA is coherent with CPU caches */ bool dma_coherent; diff --git a/arch/mips/include/asm/dma-mapping.h b/arch/mips/include/asm/dma-mapping.h index b59b084a7569..dad3b09fe993 100644 --- a/arch/mips/include/asm/dma-mapping.h +++ b/arch/mips/include/asm/dma-mapping.h @@ -13,8 +13,8 @@ extern const struct dma_map_ops *mips_dma_map_ops; static inline const struct dma_map_ops *get_dma_ops(struct device *dev) { - if (dev && dev->archdata.dma_ops) - return dev->archdata.dma_ops; + if (dev && dev->dma_ops) + return dev->dma_ops; else return mips_dma_map_ops; } diff --git a/arch/mips/pci/pci-octeon.c b/arch/mips/pci/pci-octeon.c index 308d051fc45c..9ee01936862e 100644 --- a/arch/mips/pci/pci-octeon.c +++ b/arch/mips/pci/pci-octeon.c @@ -167,7 +167,7 @@ int pcibios_plat_dev_init(struct pci_dev *dev) pci_write_config_dword(dev, pos + PCI_ERR_ROOT_STATUS, dconfig); } - dev->dev.archdata.dma_ops = octeon_pci_dma_map_ops; + dev->dev.dma_ops = octeon_pci_dma_map_ops; return 0; } |