summaryrefslogtreecommitdiff
path: root/drivers/net/can/dev.c
diff options
context:
space:
mode:
authorDavid S. Miller <davem@davemloft.net>2015-01-26 15:42:01 -0800
committerDavid S. Miller <davem@davemloft.net>2015-01-26 15:42:01 -0800
commit707d79e5cdcf7833d31fea9712f11b185ce25822 (patch)
tree6bcdc972de744e7c7129a599dba5bd12403d46b5 /drivers/net/can/dev.c
parent4141d93fc55a33bbe74c9de48f1f99dd85bf0441 (diff)
parentef186f25fdf00d92c6bd5d3301fc0ee44f17ca33 (diff)
Merge tag 'linux-can-next-for-3.20-20150121' of git://git.kernel.org/pub/scm/linux/kernel/git/mkl/linux-can-next
Marc Kleine-Budde says: ==================== pull-request: can-next 2015-21-01 this is a pull request of 4 patches for net-next/master. Andri Yngvason contributes one patch to further consolidate the CAN state change handling. The next patch is by kbuild test robot/Fengguang Wu which fixes a coccinelle warning in the CAN infrastructure. The two last patches are by me, they remove a unused variable from the flexcan and at91_can driver. ==================== Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/can/dev.c')
-rw-r--r--drivers/net/can/dev.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/drivers/net/can/dev.c b/drivers/net/can/dev.c
index 3ec8f6f25e5f..6ac02c8d747e 100644
--- a/drivers/net/can/dev.c
+++ b/drivers/net/can/dev.c
@@ -289,9 +289,11 @@ static void can_update_state_error_stats(struct net_device *dev,
priv->can_stats.error_passive++;
break;
case CAN_STATE_BUS_OFF:
+ priv->can_stats.bus_off++;
+ break;
default:
break;
- };
+ }
}
static int can_tx_state_to_frame(struct net_device *dev, enum can_state state)
@@ -544,7 +546,6 @@ void can_bus_off(struct net_device *dev)
netdev_dbg(dev, "bus-off\n");
netif_carrier_off(dev);
- priv->can_stats.bus_off++;
if (priv->restart_ms)
mod_timer(&priv->restart_timer,