diff options
author | Keith Busch <keith.busch@intel.com> | 2016-05-17 13:13:24 -0400 |
---|---|---|
committer | Bjorn Helgaas <bhelgaas@google.com> | 2016-06-13 16:59:31 -0400 |
commit | ca8a8fabb10459753fba73cac0382076f0aab058 (patch) | |
tree | db77de641050fb439f4a290655010c8e363536da | |
parent | af8c34ce6ae32addda3788d54a7e340cad22516b (diff) |
x86/PCI: VMD: Select device dma ops to override
VMD device doesn't usually have device archdata specific dma_ops, so we
need to override the default ops for VMD devices.
Signed-off-by: Keith Busch <keith.busch@intel.com>
Signed-off-by: Bjorn Helgaas <bhelgaas@google.com>
Acked-by Jon Derrick: <jonathan.derrick@intel.com>
-rw-r--r-- | arch/x86/pci/vmd.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/arch/x86/pci/vmd.c b/arch/x86/pci/vmd.c index 7792aba266df..b1662bf17937 100644 --- a/arch/x86/pci/vmd.c +++ b/arch/x86/pci/vmd.c | |||
@@ -261,7 +261,7 @@ static struct device *to_vmd_dev(struct device *dev) | |||
261 | 261 | ||
262 | static struct dma_map_ops *vmd_dma_ops(struct device *dev) | 262 | static struct dma_map_ops *vmd_dma_ops(struct device *dev) |
263 | { | 263 | { |
264 | return to_vmd_dev(dev)->archdata.dma_ops; | 264 | return get_dma_ops(to_vmd_dev(dev)); |
265 | } | 265 | } |
266 | 266 | ||
267 | static void *vmd_alloc(struct device *dev, size_t size, dma_addr_t *addr, | 267 | static void *vmd_alloc(struct device *dev, size_t size, dma_addr_t *addr, |
@@ -367,7 +367,7 @@ static void vmd_teardown_dma_ops(struct vmd_dev *vmd) | |||
367 | { | 367 | { |
368 | struct dma_domain *domain = &vmd->dma_domain; | 368 | struct dma_domain *domain = &vmd->dma_domain; |
369 | 369 | ||
370 | if (vmd->dev->dev.archdata.dma_ops) | 370 | if (get_dma_ops(&vmd->dev->dev)) |
371 | del_dma_domain(domain); | 371 | del_dma_domain(domain); |
372 | } | 372 | } |
373 | 373 | ||
@@ -379,7 +379,7 @@ static void vmd_teardown_dma_ops(struct vmd_dev *vmd) | |||
379 | 379 | ||
380 | static void vmd_setup_dma_ops(struct vmd_dev *vmd) | 380 | static void vmd_setup_dma_ops(struct vmd_dev *vmd) |
381 | { | 381 | { |
382 | const struct dma_map_ops *source = vmd->dev->dev.archdata.dma_ops; | 382 | const struct dma_map_ops *source = get_dma_ops(&vmd->dev->dev); |
383 | struct dma_map_ops *dest = &vmd->dma_ops; | 383 | struct dma_map_ops *dest = &vmd->dma_ops; |
384 | struct dma_domain *domain = &vmd->dma_domain; | 384 | struct dma_domain *domain = &vmd->dma_domain; |
385 | 385 | ||