can: m_can: is_lec_err(): clean up LEC error handling
authorMarc Kleine-Budde <mkl@pengutronix.de>
Wed, 12 Oct 2022 07:38:42 +0000 (09:38 +0200)
committerMarc Kleine-Budde <mkl@pengutronix.de>
Thu, 20 Oct 2022 09:56:14 +0000 (11:56 +0200)
commit6a8836e3c24a9f854d502b41584cf3f9765e950c
tree7c1dfbbfbbada00e91392e376f847adaaaa8444e
parent26117d92d001659b10f37ff0a338db2c8523c234
can: m_can: is_lec_err(): clean up LEC error handling

The PSR register contains among other the error for the CAN
arbitration phase (LEC bits) and CAN data phase (DLEC bits).

Prepare is_lec_err() to be called with the (D)LEC value only instead
of the whole PSR register. While there rename LEC_UNUSED to
LEC_NO_CHANGE to match the latest M_CAN reference manual.

Link: https://lore.kernel.org/all/20221019211611.1605764-1-mkl@pengutronix.de
Reviewed-by: Chandrasekar Ramakrishnan <rcsekar@samsung.com>
Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de>
drivers/net/can/m_can/m_can.c
drivers/net/can/m_can/m_can.h