can: bittiming: move bittiming calculation functions to calc_bittiming.c
authorVincent Mailhol <mailhol.vincent@wanadoo.fr>
Fri, 10 Jun 2022 14:30:05 +0000 (23:30 +0900)
committerMarc Kleine-Budde <mkl@pengutronix.de>
Sat, 11 Jun 2022 15:11:01 +0000 (17:11 +0200)
commit0c7e115138830af77d480ee9185bbdc23c6e73a4
tree941d87fa63001eb5402c0127fb1442f3781ce649
parent6a5286442fb64a2d512e4059004441e59c786ebc
can: bittiming: move bittiming calculation functions to calc_bittiming.c

The canonical way to select or deselect an object during compilation
is to use this pattern in the relevant Makefile:

bar-$(CONFIG_FOO) := foo.o

bittiming.c instead uses some #ifdef CONFIG_CAN_CALC_BITTIMG.

Create a new file named calc_bittiming.c with all the functions which
are conditionally compiled with CONFIG_CAN_CALC_BITTIMG and modify the
Makefile according to above pattern.

Link: https://lore.kernel.org/all/20220610143009.323579-4-mailhol.vincent@wanadoo.fr
Signed-off-by: Vincent Mailhol <mailhol.vincent@wanadoo.fr>
Acked-by: Max Staudt <max@enpas.org>
Tested-by: Oliver Hartkopp <socketcan@hartkopp.net>
Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de>
drivers/net/can/Kconfig
drivers/net/can/dev/Makefile
drivers/net/can/dev/bittiming.c
drivers/net/can/dev/calc_bittiming.c [new file with mode: 0644]