2009-12-13 19:11:14

by Geert Uytterhoeven

[permalink] [raw]
Subject: [PATCH] can: CAN_MCP251X should depend on HAS_DMA

When building for Sun 3:

drivers/net/can/mcp251x.c:1074: undefined reference to `dma_free_coherent'
drivers/net/can/mcp251x.c:976: undefined reference to `dma_alloc_coherent'
drivers/net/can/mcp251x.c:1050: undefined reference to `dma_free_coherent'

Signed-off-by: Geert Uytterhoeven <[email protected]>
---
drivers/net/can/Kconfig | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/drivers/net/can/Kconfig b/drivers/net/can/Kconfig
index 8c485aa..05b7517 100644
--- a/drivers/net/can/Kconfig
+++ b/drivers/net/can/Kconfig
@@ -50,7 +50,7 @@ config CAN_TI_HECC

config CAN_MCP251X
tristate "Microchip MCP251x SPI CAN controllers"
- depends on CAN_DEV && SPI
+ depends on CAN_DEV && SPI && HAS_DMA
---help---
Driver for the Microchip MCP251x SPI CAN controllers.

--
1.6.0.4

Gr{oetje,eeting}s,

Geert

--
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- [email protected]

In personal conversations with technical people, I call myself a hacker. But
when I'm talking to journalists I just say "programmer" or something like that.
-- Linus Torvalds


2009-12-13 20:47:57

by Wolfgang Grandegger

[permalink] [raw]
Subject: Re: [PATCH] can: CAN_MCP251X should depend on HAS_DMA

Geert Uytterhoeven wrote:
> When building for Sun 3:
>
> drivers/net/can/mcp251x.c:1074: undefined reference to `dma_free_coherent'
> drivers/net/can/mcp251x.c:976: undefined reference to `dma_alloc_coherent'
> drivers/net/can/mcp251x.c:1050: undefined reference to `dma_free_coherent'
>
> Signed-off-by: Geert Uytterhoeven <[email protected]>
> ---
> drivers/net/can/Kconfig | 2 +-
> 1 files changed, 1 insertions(+), 1 deletions(-)
>
> diff --git a/drivers/net/can/Kconfig b/drivers/net/can/Kconfig
> index 8c485aa..05b7517 100644
> --- a/drivers/net/can/Kconfig
> +++ b/drivers/net/can/Kconfig
> @@ -50,7 +50,7 @@ config CAN_TI_HECC
>
> config CAN_MCP251X
> tristate "Microchip MCP251x SPI CAN controllers"
> - depends on CAN_DEV && SPI
> + depends on CAN_DEV && SPI && HAS_DMA
> ---help---
> Driver for the Microchip MCP251x SPI CAN controllers.
>

DMA can be selected with the module parameter "mcp251x_enable_dma" and
is *off* by default. Therefore the driver does in principle not depend
on HAS_DMA but I'm not sure if it's worth to handle it with #idef's.
Christian? Any thought?

Wolfgang.

2009-12-14 01:40:27

by David Miller

[permalink] [raw]
Subject: Re: [PATCH] can: CAN_MCP251X should depend on HAS_DMA

From: Wolfgang Grandegger <[email protected]>
Date: Sun, 13 Dec 2009 21:47:04 +0100

> DMA can be selected with the module parameter "mcp251x_enable_dma" and
> is *off* by default. Therefore the driver does in principle not depend
> on HAS_DMA but I'm not sure if it's worth to handle it with #idef's.
> Christian? Any thought?

I still think it's a reasonable dependency.

You're not going to find this device on a s390 system. :-)

2009-12-14 03:59:29

by David Miller

[permalink] [raw]
Subject: Re: [PATCH] can: CAN_MCP251X should depend on HAS_DMA

From: Geert Uytterhoeven <[email protected]>
Date: Sun, 13 Dec 2009 20:11:06 +0100 (CET)

> When building for Sun 3:
>
> drivers/net/can/mcp251x.c:1074: undefined reference to `dma_free_coherent'
> drivers/net/can/mcp251x.c:976: undefined reference to `dma_alloc_coherent'
> drivers/net/can/mcp251x.c:1050: undefined reference to `dma_free_coherent'
>
> Signed-off-by: Geert Uytterhoeven <[email protected]>

Applied.

2009-12-14 07:35:30

by Wolfgang Grandegger

[permalink] [raw]
Subject: Re: [PATCH] can: CAN_MCP251X should depend on HAS_DMA

David Miller wrote:
> From: Wolfgang Grandegger <[email protected]>
> Date: Sun, 13 Dec 2009 21:47:04 +0100
>
>> DMA can be selected with the module parameter "mcp251x_enable_dma" and
>> is *off* by default. Therefore the driver does in principle not depend
>> on HAS_DMA but I'm not sure if it's worth to handle it with #idef's.
>> Christian? Any thought?
>
> I still think it's a reasonable dependency.
>
> You're not going to find this device on a s390 system. :-)

OK, we could change that on request.

Wolfgang.

2009-12-14 08:14:29

by christian pellegrin

[permalink] [raw]
Subject: Re: [PATCH] can: CAN_MCP251X should depend on HAS_DMA

On Mon, Dec 14, 2009 at 8:34 AM, Wolfgang Grandegger <[email protected]> wrote:
> David Miller wrote:
>>
>> I still think it's a reasonable dependency.
>>
>> You're not going to find this device on a s390 system. :-)
>
> OK, we could change that on request.
>
> Wolfgang.
>

Hi, sorry for the late answer. I agree it's a reasonable dependency.
Anyway it's easy to #ifdef it out if anyone cares.

Bye,

--
Christian Pellegrin, see http://www.evolware.org/chri/
"Real Programmers don't play tennis, or any other sport which requires
you to change clothes. Mountain climbing is OK, and Real Programmers
wear their climbing boots to work in case a mountain should suddenly
spring up in the middle of the computer room."