Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 707d79e5 authored by David S. Miller's avatar David S. Miller
Browse files

Merge tag 'linux-can-next-for-3.20-20150121' of...

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: default avatarDavid S. Miller <davem@davemloft.net>
parents 4141d93f ef186f25
Loading
Loading
Loading
Loading
+0 −2
Original line number Diff line number Diff line
@@ -138,7 +138,6 @@ struct at91_devtype_data {

struct at91_priv {
	struct can_priv can;		/* must be the first member! */
	struct net_device *dev;
	struct napi_struct napi;

	void __iomem *reg_base;
@@ -1350,7 +1349,6 @@ static int at91_can_probe(struct platform_device *pdev)
	priv->can.do_get_berr_counter = at91_get_berr_counter;
	priv->can.ctrlmode_supported = CAN_CTRLMODE_3_SAMPLES |
		CAN_CTRLMODE_LISTENONLY;
	priv->dev = dev;
	priv->reg_base = addr;
	priv->devtype_data = *devtype_data;
	priv->clk = clk;
+1 −0
Original line number Diff line number Diff line
@@ -352,6 +352,7 @@ static int bfin_can_err(struct net_device *dev, u16 isrc, u16 status)
		netdev_dbg(dev, "bus-off mode interrupt\n");
		state = CAN_STATE_BUS_OFF;
		cf->can_id |= CAN_ERR_BUSOFF;
		priv->can.can_stats.bus_off++;
		can_bus_off(dev);
	}

+1 −1
Original line number Diff line number Diff line
@@ -866,7 +866,7 @@ static int c_can_handle_state_change(struct net_device *dev,
	case C_CAN_BUS_OFF:
		/* bus-off state */
		priv->can.state = CAN_STATE_BUS_OFF;
		can_bus_off(dev);
		priv->can.can_stats.bus_off++;
		break;
	default:
		break;
+1 −0
Original line number Diff line number Diff line
@@ -535,6 +535,7 @@ static int cc770_err(struct net_device *dev, u8 status)
		cc770_write_reg(priv, control, CTRL_INI);
		cf->can_id |= CAN_ERR_BUSOFF;
		priv->can.state = CAN_STATE_BUS_OFF;
		priv->can.can_stats.bus_off++;
		can_bus_off(dev);
	} else if (status & STAT_WARN) {
		cf->can_id |= CAN_ERR_CRTL;
+3 −2
Original line number Diff line number Diff line
@@ -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,
Loading