]> git.baikalelectronics.ru Git - kernel.git/commit
can: bittiming: replace CAN units with the generic ones from linux/units.h
authorVincent Mailhol <mailhol.vincent@wanadoo.fr>
Wed, 24 Nov 2021 01:45:36 +0000 (10:45 +0900)
committerMarc Kleine-Budde <mkl@pengutronix.de>
Wed, 8 Dec 2021 09:12:58 +0000 (10:12 +0100)
commit43004f0f3cbf97c4c0f32d7df59819352d96f09f
treef6f67d18bf56d518ddc58b55a3d7e4047e80fc34
parent386c565cc114f73f02aedeba4287397e4eb32e50
can: bittiming: replace CAN units with the generic ones from linux/units.h

In [1], we introduced a set of units in linux/can/bittiming.h. Since
then, generic SI prefixes were added to linux/units.h in [2]. Those
new prefixes can perfectly replace CAN specific ones.

This patch replaces all occurrences of the CAN units with their
corresponding prefix (from linux/units) and the unit (as a comment)
according to below table.

 CAN units SI metric prefix (from linux/units) + unit (as a comment)
 ------------------------------------------------------------------------
 CAN_KBPS KILO /* BPS */
 CAN_MBPS MEGA /* BPS */
 CAM_MHZ MEGA /* Hz */

The definition are then removed from linux/can/bittiming.h

[1] commit 93612054125d ("can: bittiming: add CAN_KBPS, CAN_MBPS and
CAN_MHZ macros")

[2] commit 7520fcba3904 ("units: Add SI metric prefix definitions")

Link: https://lore.kernel.org/all/20211124014536.782550-1-mailhol.vincent@wanadoo.fr
Suggested-by: Jimmy Assarsson <extja@kvaser.com>
Suggested-by: Oliver Hartkopp <socketcan@hartkopp.net>
Signed-off-by: Vincent Mailhol <mailhol.vincent@wanadoo.fr>
Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de>
drivers/net/can/dev/bittiming.c
drivers/net/can/usb/etas_es58x/es581_4.c
drivers/net/can/usb/etas_es58x/es58x_fd.c
include/linux/can/bittiming.h