]> git.baikalelectronics.ru Git - kernel.git/commit
can: only call can_stat_update with procfs
authorArnd Bergmann <arnd@arndb.de>
Mon, 20 Jun 2016 15:51:52 +0000 (17:51 +0200)
committerMarc Kleine-Budde <mkl@pengutronix.de>
Thu, 23 Jun 2016 09:23:49 +0000 (11:23 +0200)
commit8bdaa0655cb294ced88724531578d4cb5fd4cadf
tree8ed27b0a850a173cbfd1cab3227ee0c271ec48f0
parent8d611f076c87662483e8d96346239ee6aaa52964
can: only call can_stat_update with procfs

The change to leave out procfs support in CAN when CONFIG_PROC_FS
is not set was incomplete and leads to a build error:

net/built-in.o: In function `can_init':
:(.init.text+0x9858): undefined reference to `can_stat_update'
ERROR: "can_stat_update" [net/can/can.ko] undefined!

This tries a better approach, encapsulating all of the calls
within IS_ENABLED(), so we also leave out the timer function
from the object file.

Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Fixes: 8a3f6beeacec ("can: build proc support only if CONFIG_PROC_FS is activated")
Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de>
net/can/af_can.c
net/can/af_can.h