From: Andreas Larsson Date: Mon, 8 Sep 2014 07:48:52 +0000 (+0200) Subject: sparc32, leon: Make leon_dma_ops avaiable when !CONFIG_PCI X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=b84ca92e1672432aac43cccaaa572881e7cc9fdd;p=GitHub%2FLineageOS%2FG12%2Fandroid_kernel_amlogic_linux-4.9.git sparc32, leon: Make leon_dma_ops avaiable when !CONFIG_PCI The leon_dma_ops struct is needed for leon regardless of PCI configuration. Signed-off-by: Andreas Larsson Signed-off-by: David S. Miller --- diff --git a/arch/sparc/include/asm/dma-mapping.h b/arch/sparc/include/asm/dma-mapping.h index 1ee02710b2dc..5b1b52a04ad6 100644 --- a/arch/sparc/include/asm/dma-mapping.h +++ b/arch/sparc/include/asm/dma-mapping.h @@ -20,10 +20,12 @@ extern struct bus_type pci_bus_type; static inline struct dma_map_ops *get_dma_ops(struct device *dev) { -#if defined(CONFIG_SPARC32) && defined(CONFIG_PCI) +#ifdef CONFIG_SPARC_LEON if (sparc_cpu_model == sparc_leon) return leon_dma_ops; - else if (dev->bus == &pci_bus_type) +#endif +#if defined(CONFIG_SPARC32) && defined(CONFIG_PCI) + if (dev->bus == &pci_bus_type) return &pci32_dma_ops; #endif return dma_ops;