]> git.baikalelectronics.ru Git - kernel.git/commit
can: peak_usb: pcan_usb_decode_error(): upgrade handling of bus state changes
authorStephane Grosjean <s.grosjean@peak-system.com>
Thu, 15 Jul 2021 14:28:41 +0000 (16:28 +0200)
committerMarc Kleine-Budde <mkl@pengutronix.de>
Sun, 25 Jul 2021 09:36:28 +0000 (11:36 +0200)
commit602b0abf0194c3690df5330f9204a1bb28897638
treecdc721fdf7577a18d6c2f9bd85bb71115c3b1c71
parentaf9bb8e3733d87f284c8069acd497e1e2ef32785
can: peak_usb: pcan_usb_decode_error(): upgrade handling of bus state changes

This patch updates old code by using the can_change_state() function
published since by the socket-can module.

In particular, this new code better manages the change of bus state by
also using the value of the error counters that the driver now
systematically asks for when initializing the channel.

Link: https://lore.kernel.org/r/20210715142842.35793-1-s.grosjean@peak-system.com
Signed-off-by: Stephane Grosjean <s.grosjean@peak-system.com>
Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de>
drivers/net/can/usb/peak_usb/pcan_usb.c