diff options
author | Marc Kleine-Budde <mkl@pengutronix.de> | 2010-10-20 21:01:13 -0400 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2010-10-24 17:47:47 -0400 |
commit | dbe91325c2d6ad34c1ce4f2aeae4bbd11b7a3fff (patch) | |
tree | 8dfa140de5d0be3ed7bb9b089009eda9a6d3415f | |
parent | b21d18b51b31a24d17f883b678432fbdee3d5675 (diff) |
can: at91_can: use correct bit to enable CAN_CTRLMODE_3_SAMPLES
Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de>
Signed-off-by: David S. Miller <davem@davemloft.net>
-rw-r--r-- | drivers/net/can/at91_can.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/drivers/net/can/at91_can.c b/drivers/net/can/at91_can.c index 2d8bd86bc5e2..b2a4599eb1d7 100644 --- a/drivers/net/can/at91_can.c +++ b/drivers/net/can/at91_can.c | |||
@@ -2,7 +2,7 @@ | |||
2 | * at91_can.c - CAN network driver for AT91 SoC CAN controller | 2 | * at91_can.c - CAN network driver for AT91 SoC CAN controller |
3 | * | 3 | * |
4 | * (C) 2007 by Hans J. Koch <hjk@linutronix.de> | 4 | * (C) 2007 by Hans J. Koch <hjk@linutronix.de> |
5 | * (C) 2008, 2009 by Marc Kleine-Budde <kernel@pengutronix.de> | 5 | * (C) 2008, 2009, 2010 by Marc Kleine-Budde <kernel@pengutronix.de> |
6 | * | 6 | * |
7 | * This software may be distributed under the terms of the GNU General | 7 | * This software may be distributed under the terms of the GNU General |
8 | * Public License ("GPL") version 2 as distributed in the 'COPYING' | 8 | * Public License ("GPL") version 2 as distributed in the 'COPYING' |
@@ -257,8 +257,8 @@ static int at91_set_bittiming(struct net_device *dev) | |||
257 | const struct can_bittiming *bt = &priv->can.bittiming; | 257 | const struct can_bittiming *bt = &priv->can.bittiming; |
258 | u32 reg_br; | 258 | u32 reg_br; |
259 | 259 | ||
260 | reg_br = ((priv->can.ctrlmode & CAN_CTRLMODE_3_SAMPLES) << 24) | | 260 | reg_br = ((priv->can.ctrlmode & CAN_CTRLMODE_3_SAMPLES) ? 1 << 24 : 0) | |
261 | ((bt->brp - 1) << 16) | ((bt->sjw - 1) << 12) | | 261 | ((bt->brp - 1) << 16) | ((bt->sjw - 1) << 12) | |
262 | ((bt->prop_seg - 1) << 8) | ((bt->phase_seg1 - 1) << 4) | | 262 | ((bt->prop_seg - 1) << 8) | ((bt->phase_seg1 - 1) << 4) | |
263 | ((bt->phase_seg2 - 1) << 0); | 263 | ((bt->phase_seg2 - 1) << 0); |
264 | 264 | ||