]> git.baikalelectronics.ru Git - kernel.git/commit
dmascc: add CONFIG_VIRT_TO_BUS dependency
authorArnd Bergmann <arnd@arndb.de>
Mon, 27 Sep 2021 14:15:24 +0000 (16:15 +0200)
committerDavid S. Miller <davem@davemloft.net>
Tue, 28 Sep 2021 12:12:07 +0000 (13:12 +0100)
commitb6363ff9d23c09fdefd0389e5f81ea375cf570c6
treec1c71b5012e3d847ccbf7d64d3970df8688dd047
parent7ef4588bcd60b415bb72872ed126b6a5d629fe97
dmascc: add CONFIG_VIRT_TO_BUS dependency

Many architectures don't define virt_to_bus() any more, as drivers
should be using the dma-mapping interfaces where possible:

In file included from drivers/net/hamradio/dmascc.c:27:
drivers/net/hamradio/dmascc.c: In function 'tx_on':
drivers/net/hamradio/dmascc.c:976:30: error: implicit declaration of function 'virt_to_bus'; did you mean 'virt_to_fix'? [-Werror=implicit-function-declaration]
  976 |                              virt_to_bus(priv->tx_buf[priv->tx_tail]) + n);
      |                              ^~~~~~~~~~~
arch/arm/include/asm/dma.h:109:52: note: in definition of macro 'set_dma_addr'
  109 |         __set_dma_addr(chan, (void *)__bus_to_virt(addr))
      |                                                    ^~~~

Add the Kconfig dependency to prevent this from being built on
architectures without virt_to_bus().

Fixes: af4183ad47e9 ("dmascc: use proper 'virt_to_bus()' rather than casting to 'int'")
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/hamradio/Kconfig