Skip to contentSkip to conversation

sparc32, leon: Make leom_dma_ops avaiable when !CONFIG_PCI

PATCH Superseded Andreas Larsson 2 participants 3 messages Sep 2, 2014 – Sep 9, 2014 SPARC + UltraSPARC (sparc/sparc64)

lore
Share & tools
lore

Andreas Larsson

author maintainer
#0 lore raw

PATCH 1/1 sparc32, leon: Make leom_dma_ops avaiable when !CONFIG_PCI

The leon_dma_ops struct is needed for leon regardless of PCI configuration.

---
 arch/sparc/include/asm/dma-mapping.h |    6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)
arch/sparc/include/asm/dma-mapping.h +4 -2
index 1ee0271..5b1b52a 100644
@@ -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;
Signature · 1 line
1.7.10.4
author maintainer
#1 lore raw

PATCH v2 1/1 sparc32, leon: Make leon_dma_ops avaiable when !CONFIG_PCI

The leon_dma_ops struct is needed for leon regardless of PCI configuration.

---
Changes from v1: Fixed typo in commit message

 arch/sparc/include/asm/dma-mapping.h |    6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)
arch/sparc/include/asm/dma-mapping.h +4 -2
index 1ee0271..5b1b52a 100644
@@ -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;
Signature · 1 line
1.7.10.4
maintainer Applied
#2 lore raw

Re: [PATCH v2] sparc32, leon: Make leon_dma_ops avaiable when !CONFIG_PCI

From: Andreas Larsson <[email protected]>
Date: Mon, 8 Sep 2014 09:48:52 +0200

Quoted 5 lines

The leon_dma_ops struct is needed for leon regardless of PCI configuration.

---
Changes from v1: Fixed typo in commit message

Applied.