summaryrefslogtreecommitdiffstats
path: root/drivers/net/usb/catc.c
diff options
context:
space:
mode:
authorAl Viro2008-05-21 07:32:11 +0200
committerLinus Torvalds2008-05-22 01:55:59 +0200
commit4ec7ffa2df247054d422b48148ad82369a45e986 (patch)
treebb309f0ef31ee8f1399dec86f3e03b34f8c72714 /drivers/net/usb/catc.c
parentthanks to net/mac80211 we need to pull drivers/leds/Kconfig on uml (diff)
downloadkernel-qcow2-linux-4ec7ffa2df247054d422b48148ad82369a45e986.tar.gz
kernel-qcow2-linux-4ec7ffa2df247054d422b48148ad82369a45e986.tar.xz
kernel-qcow2-linux-4ec7ffa2df247054d422b48148ad82369a45e986.zip
misc drivers/net endianness noise
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'drivers/net/usb/catc.c')
-rw-r--r--drivers/net/usb/catc.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/drivers/net/usb/catc.c b/drivers/net/usb/catc.c
index 76752d84a30f..22c17bbacb69 100644
--- a/drivers/net/usb/catc.c
+++ b/drivers/net/usb/catc.c
@@ -423,7 +423,10 @@ static int catc_hard_start_xmit(struct sk_buff *skb, struct net_device *netdev)
catc->tx_ptr = (((catc->tx_ptr - 1) >> 6) + 1) << 6;
tx_buf = catc->tx_buf[catc->tx_idx] + catc->tx_ptr;
- *((u16*)tx_buf) = (catc->is_f5u011) ? cpu_to_be16((u16)skb->len) : cpu_to_le16((u16)skb->len);
+ if (catc->is_f5u011)
+ *(__be16 *)tx_buf = cpu_to_be16(skb->len);
+ else
+ *(__le16 *)tx_buf = cpu_to_le16(skb->len);
skb_copy_from_linear_data(skb, tx_buf + 2, skb->len);
catc->tx_ptr += skb->len + 2;