can: move can_stats.bus_off++ from can_bus_off into can_change_state
authorAndri Yngvason <andri.yngvason@marel.com>
Fri, 16 Jan 2015 14:30:28 +0000 (14:30 +0000)
committerMarc Kleine-Budde <mkl@pengutronix.de>
Tue, 20 Jan 2015 12:56:53 +0000 (13:56 +0100)
commitbe38a6f9f4093b0f1fa9e7d8cb47d588bc117c21
tree41a834156d6483c55fa28eccfc208449bff67d95
parent0c49087462e8587c12ecfeaf1dd46fdc0ddc4532
can: move can_stats.bus_off++ from can_bus_off into can_change_state

In order to be able to move the stats increment from can_bus_off() into
can_change_state(), the increment had to be moved back into code that was using
can_bus_off() but not can_change_state().

As a side-effect, this patch fixes the following bugs:
 * Redundant call to can_bus_off() in c_can.
 * Bus-off counted twice in xilinx_can.

Signed-off-by: Andri Yngvason <andri.yngvason@marel.com>
Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de>
16 files changed:
drivers/net/can/bfin_can.c
drivers/net/can/c_can/c_can.c
drivers/net/can/cc770/cc770.c
drivers/net/can/dev.c
drivers/net/can/janz-ican3.c
drivers/net/can/m_can/m_can.c
drivers/net/can/pch_can.c
drivers/net/can/rcar_can.c
drivers/net/can/softing/softing_main.c
drivers/net/can/spi/mcp251x.c
drivers/net/can/ti_hecc.c
drivers/net/can/usb/ems_usb.c
drivers/net/can/usb/esd_usb2.c
drivers/net/can/usb/peak_usb/pcan_usb.c
drivers/net/can/usb/peak_usb/pcan_usb_pro.c
drivers/net/can/usb/usb_8dev.c