Skip to contentSkip to conversation

staging: comedi: labpc: fix isadma dependency

PATCH In review Arnd Bergmann 2 participants 2 messages Mar 29, 2017 – Mar 30, 2017 Staging

lore
Share & tools
lore
#0 lore raw

PATCH v2 1/1 staging: comedi: labpc: fix isadma dependency

When COMEDI_NI_LABPC is built-in and COMEDI_NI_LABPC_ISA is a loadable module, thhe ISA DMA code is not reachable by the common module, causing a link error:

drivers/staging/built-in.o: In function `labpc_interrupt':
ni_labpc_common.c:(.text+0x1d178): undefined reference to labpc_handle_dma_status' ni_labpc_common.c:(.text+0x1d1cb): undefined reference to labpc_drain_dma' drivers/staging/built-in.o: In function `labpc_ai_cmd':
ni_labpc_common.c:(.text+0x1d8ad): undefined reference to `labpc_setup_dma'

This changes the definition of COMEDI_NI_LABPC_ISADMA so that it will also be builtin for that case. This looks like a rather old bug, but I have never seen this in randconfig testing until today.

---
 drivers/staging/comedi/Kconfig | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

v2: fix typo from first version, forgot to amend the patch after successfully
testing until I had sent it out.

drivers/staging/comedi/Kconfig +3 -1
index 6079c23237d5..7a655ed071a3 100644
@@ -505,7 +505,6 @@ config COMEDI_NI_ATMIO16D
 config COMEDI_NI_LABPC_ISA
 	tristate "NI Lab-PC and compatibles ISA support"
 	select COMEDI_NI_LABPC
-	select COMEDI_NI_LABPC_ISADMA if ISA_DMA_API
 	---help---
 	  Enable support for National Instruments Lab-PC and compatibles
 	  Lab-PC-1200, Lab-PC-1200AI, Lab-PC+.
@@ -1315,6 +1314,9 @@ config COMEDI_NI_LABPC
 
 config COMEDI_NI_LABPC_ISADMA
 	tristate
+	default COMEDI_NI_LABPC
+	depends on COMEDI_NI_LABPC_ISA != n
+	depends on ISA_DMA_API
 	select COMEDI_ISADMA
 
 config COMEDI_NI_TIO
Signature · 1 line
2.9.0
Reviewed-by on v2 1/1
#1 lore raw
Quoted 10 lines · Arnd Bergmann

When COMEDI_NI_LABPC is built-in and COMEDI_NI_LABPC_ISA is a loadable module, thhe ISA DMA code is not reachable by the common module, causing a link error:

drivers/staging/built-in.o: In function `labpc_interrupt':
ni_labpc_common.c:(.text+0x1d178): undefined reference to labpc_handle_dma_status' ni_labpc_common.c:(.text+0x1d1cb): undefined reference to labpc_drain_dma' drivers/staging/built-in.o: In function `labpc_ai_cmd':
ni_labpc_common.c:(.text+0x1d8ad): undefined reference to `labpc_setup_dma'

Quoted 3 lines

This changes the definition of COMEDI_NI_LABPC_ISADMA so that it will also be builtin for that case. This looks like a rather old bug, but I have never seen this in randconfig testing until today.

That's because the comedi stuff has only recently been configurable as built-in.

Quoted 23 lines
---
 drivers/staging/comedi/Kconfig | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

v2: fix typo from first version, forgot to amend the patch after successfully
testing until I had sent it out.

drivers/staging/comedi/Kconfig +0 -1
index 6079c23237d5..7a655ed071a3 100644
@@ -505,7 +505,6 @@ config COMEDI_NI_ATMIO16D
 config COMEDI_NI_LABPC_ISA
 	tristate "NI Lab-PC and compatibles ISA support"
 	select COMEDI_NI_LABPC
-	select COMEDI_NI_LABPC_ISADMA if ISA_DMA_API
 	---help---
 	  Enable support for National Instruments Lab-PC and compatibles
 	  Lab-PC-1200, Lab-PC-1200AI, Lab-PC+.

drivers/staging/comedi/Kconfig config COMEDI_NI_LABPC · line 1322

Quoted 9 lines
drivers/staging/comedi/Kconfig +3 -0
@@ -1315,6 +1314,9 @@ config COMEDI_NI_LABPC
 
 config COMEDI_NI_LABPC_ISADMA
 	tristate
+	default COMEDI_NI_LABPC
+	depends on COMEDI_NI_LABPC_ISA != n
+	depends on ISA_DMA_API
 	select COMEDI_ISADMA
 
 config COMEDI_NI_TIO

Thanks for the fix!

Signature · 2 lines
-=( Ian Abbott @ MEV Ltd.    E-mail: <[email protected]> )=-
-=(                          Web: http://www.mev.co.uk/  )=-