]> git.ipfire.org Git - thirdparty/linux.git/commit
can: fix build dependency
authorArnd Bergmann <arnd@arndb.de>
Thu, 4 Dec 2025 10:00:09 +0000 (11:00 +0100)
committerMarc Kleine-Budde <mkl@pengutronix.de>
Wed, 10 Dec 2025 08:19:34 +0000 (09:19 +0100)
commit6abd4577bccc66f83edfdb24dc484723ae99cbe8
tree4bc8d88b3d994aa205cdf98e955fd2cafdc9be23
parent186468c67fc687650b7fb713d8c627d5c8566886
can: fix build dependency

A recent bugfix introduced a new problem with Kconfig dependencies:

WARNING: unmet direct dependencies detected for CAN_DEV
  Depends on [n]: NETDEVICES [=n] && CAN [=m]
  Selected by [m]:
  - CAN [=m] && NET [=y]

Since the CAN core code now links into the CAN device code, that
particular function needs to be available, though the rest of it
does not.

Revert the incomplete fix and instead use Makefile logic to avoid
the link failure.

Fixes: cb2dc6d2869a ("can: Kconfig: select CAN driver infrastructure by default")
Reported-by: kernel test robot <lkp@intel.com>
Closes: https://lore.kernel.org/oe-kbuild-all/202512091523.zty3CLmc-lkp@intel.com/
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Tested-by: Oliver Hartkopp <socketcan@hartkopp.net>
Acked-by: Oliver Hartkopp <socketcan@hartkopp.net>
Link: https://patch.msgid.link/20251204100015.1033688-1-arnd@kernel.org
[mkl: removed module option from CAN_DEV help text (thanks Vincent)]
[mkl: removed '&& CAN' from Kconfig dependency (thanks Vincent)]
Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de>
drivers/net/can/Kconfig
drivers/net/can/Makefile
drivers/net/can/dev/Makefile
net/can/Kconfig