diff options
author | Michael Hennerich <michael.hennerich@analog.com> | 2009-12-21 12:53:24 -0500 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@suse.de> | 2010-03-02 17:53:26 -0500 |
commit | 8ca5bfab154487fd75a946e6e95d3519eb74be6a (patch) | |
tree | f2bb7bb04734e1742f78bc682beb8f8a3bd790b5 /drivers/usb | |
parent | 6ebb7d1b4b98162e332ff43a8739c2c1c690b140 (diff) |
USB: host: SL811: fix unaligned accesses
Signed-off-by: Michael Hennerich <michael.hennerich@analog.com>
Signed-off-by: Bryan Wu <cooloney@kernel.org>
Signed-off-by: Mike Frysinger <vapier@gentoo.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Diffstat (limited to 'drivers/usb')
-rw-r--r-- | drivers/usb/host/sl811-hcd.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/drivers/usb/host/sl811-hcd.c b/drivers/usb/host/sl811-hcd.c index 5b22a4d1c9e4..e11cc3aa4b82 100644 --- a/drivers/usb/host/sl811-hcd.c +++ b/drivers/usb/host/sl811-hcd.c | |||
@@ -51,6 +51,7 @@ | |||
51 | #include <asm/irq.h> | 51 | #include <asm/irq.h> |
52 | #include <asm/system.h> | 52 | #include <asm/system.h> |
53 | #include <asm/byteorder.h> | 53 | #include <asm/byteorder.h> |
54 | #include <asm/unaligned.h> | ||
54 | 55 | ||
55 | #include "../core/hcd.h" | 56 | #include "../core/hcd.h" |
56 | #include "sl811.h" | 57 | #include "sl811.h" |
@@ -1272,12 +1273,12 @@ sl811h_hub_control( | |||
1272 | sl811h_hub_descriptor(sl811, (struct usb_hub_descriptor *) buf); | 1273 | sl811h_hub_descriptor(sl811, (struct usb_hub_descriptor *) buf); |
1273 | break; | 1274 | break; |
1274 | case GetHubStatus: | 1275 | case GetHubStatus: |
1275 | *(__le32 *) buf = cpu_to_le32(0); | 1276 | put_unaligned_le32(0, buf); |
1276 | break; | 1277 | break; |
1277 | case GetPortStatus: | 1278 | case GetPortStatus: |
1278 | if (wIndex != 1) | 1279 | if (wIndex != 1) |
1279 | goto error; | 1280 | goto error; |
1280 | *(__le32 *) buf = cpu_to_le32(sl811->port1); | 1281 | put_unaligned_le32(sl811->port1, buf); |
1281 | 1282 | ||
1282 | #ifndef VERBOSE | 1283 | #ifndef VERBOSE |
1283 | if (*(u16*)(buf+2)) /* only if wPortChange is interesting */ | 1284 | if (*(u16*)(buf+2)) /* only if wPortChange is interesting */ |