aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/can/at91_can.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/net/can/at91_can.c')
-rw-r--r--drivers/net/can/at91_can.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/net/can/at91_can.c b/drivers/net/can/at91_can.c
index cbe3fce53e3..d0ec17878ff 100644
--- a/drivers/net/can/at91_can.c
+++ b/drivers/net/can/at91_can.c
@@ -474,7 +474,7 @@ static void at91_read_mb(struct net_device *dev, unsigned int mb,
474 reg_msr = at91_read(priv, AT91_MSR(mb)); 474 reg_msr = at91_read(priv, AT91_MSR(mb));
475 if (reg_msr & AT91_MSR_MRTR) 475 if (reg_msr & AT91_MSR_MRTR)
476 cf->can_id |= CAN_RTR_FLAG; 476 cf->can_id |= CAN_RTR_FLAG;
477 cf->can_dlc = min_t(__u8, (reg_msr >> 16) & 0xf, 8); 477 cf->can_dlc = get_can_dlc((reg_msr >> 16) & 0xf);
478 478
479 *(u32 *)(cf->data + 0) = at91_read(priv, AT91_MDL(mb)); 479 *(u32 *)(cf->data + 0) = at91_read(priv, AT91_MDL(mb));
480 *(u32 *)(cf->data + 4) = at91_read(priv, AT91_MDH(mb)); 480 *(u32 *)(cf->data + 4) = at91_read(priv, AT91_MDH(mb));