summaryrefslogtreecommitdiffstats
path: root/drivers/net/can/cc770/cc770.c
diff options
context:
space:
mode:
authorOliver Hartkopp <socketcan@hartkopp.net>2020-11-10 11:18:46 +0100
committerMarc Kleine-Budde <mkl@pengutronix.de>2020-11-20 09:43:29 +0100
commit69d98969a0540039fc04e0f22bbe9f41b0a13d66 (patch)
treecaf7410d6dd6ec78a672734a095c754d2a540156 /drivers/net/can/cc770/cc770.c
parentea7800565a128c1adafa1791ce80afd6016fe21c (diff)
downloadlinux-69d98969a0540039fc04e0f22bbe9f41b0a13d66.tar.bz2
can: rename get_can_dlc() macro with can_cc_dlc2len()
The get_can_dlc() macro is used to ensure the payload length information of the Classical CAN frame to be max 8 bytes (the CAN_MAX_DLEN). Rename the macro and use the correct constant in preparation of the len/dlc cleanup for Classical CAN frames. Signed-off-by: Oliver Hartkopp <socketcan@hartkopp.net> Link: https://lore.kernel.org/r/20201110101852.1973-3-socketcan@hartkopp.net Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de>
Diffstat (limited to 'drivers/net/can/cc770/cc770.c')
-rw-r--r--drivers/net/can/cc770/cc770.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/net/can/cc770/cc770.c b/drivers/net/can/cc770/cc770.c
index 07e2b8df5153..3fd2a276dd93 100644
--- a/drivers/net/can/cc770/cc770.c
+++ b/drivers/net/can/cc770/cc770.c
@@ -486,7 +486,7 @@ static void cc770_rx(struct net_device *dev, unsigned int mo, u8 ctrl1)
}
cf->can_id = id;
- cf->can_dlc = get_can_dlc((config & 0xf0) >> 4);
+ cf->can_dlc = can_cc_dlc2len((config & 0xf0) >> 4);
for (i = 0; i < cf->can_dlc; i++)
cf->data[i] = cc770_read_reg(priv, msgobj[mo].data[i]);
}