can: at91_can: at91_irq_err_line(): make use of can_state_get_by_berr_counter()
On the sam9263 the SR bits for bus off, error passive, warning limit, and error active are not latched and reflect the current status of the controller. On the sam9x5 and newer SoCs these bits are latched. To simplify the code, use can_state_get_by_berr_counter() to get the state of the controller regardless of the SoC version. Link: https://lore.kernel.org/all/20231005-at91_can-rx_offload-v2-22-9987d53600e0@pengutronix.deSigned-off-by: Marc Kleine-Budde <mkl@pengutronix.de>
Showing
Please register or sign in to comment