diff options
author | David S. Miller <davem@davemloft.net> | 2012-03-15 14:34:07 -0700 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2012-03-15 14:34:07 -0700 |
commit | 1174764e810998e81b334b5ccdfad8a9d059c6a1 (patch) | |
tree | 1d525d6343830287c6372e76f377dace96f901f4 | |
parent | cdf485be3a63d1f34293740fb726088c6840ceea (diff) | |
parent | 1ccba2103a8b3a1041f261301b08b9e16f76df8a (diff) |
Merge branch 'master' of git://gitorious.org/linux-can/linux-can-next
-rw-r--r-- | drivers/net/can/usb/peak_usb/pcan_usb.c | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/drivers/net/can/usb/peak_usb/pcan_usb.c b/drivers/net/can/usb/peak_usb/pcan_usb.c index 8a7982e18e4..86f26a1ede4 100644 --- a/drivers/net/can/usb/peak_usb/pcan_usb.c +++ b/drivers/net/can/usb/peak_usb/pcan_usb.c @@ -741,16 +741,14 @@ static int pcan_usb_encode_msg(struct peak_usb_device *dev, struct sk_buff *skb, /* can id */ if (cf->can_id & CAN_EFF_FLAG) { - __le32 tmp32 = cpu_to_le32(cf->can_id & CAN_ERR_MASK); + __le32 tmp32 = cpu_to_le32((cf->can_id & CAN_ERR_MASK) << 3); - tmp32 <<= 3; *pc |= PCAN_USB_STATUSLEN_EXT_ID; memcpy(++pc, &tmp32, 4); pc += 4; } else { - __le16 tmp16 = cpu_to_le32(cf->can_id & CAN_ERR_MASK); + __le16 tmp16 = cpu_to_le16((cf->can_id & CAN_ERR_MASK) << 5); - tmp16 <<= 5; memcpy(++pc, &tmp16, 2); pc += 2; } |