aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/usb
diff options
context:
space:
mode:
authorMax Dmitrichenko <dmitrmax@gmail.com>2007-03-05 18:45:01 -0500
committerGreg Kroah-Hartman <gregkh@suse.de>2007-03-09 22:52:25 -0500
commit64543652609fc1a2a816dc38ce4f56eddda9f9a5 (patch)
tree2f5e2c82bc7cf37655c93410ce8ab58478cbdd1e /drivers/usb
parentd8b2160683bd1cee759e72a53193484c25a006bd (diff)
USB: fix Unaligned access in EHCI driver
I get following warnings on spar64: Kernel unaligned access at TPC[1000c9e4] ehci_hub_control+0x54c/0x68c [ehci_hcd] Despite of the comment in the patched code, the type cast used there does make unaligned access. The fix was made as it's done in ohci-hub.c. Signed-off-by: Max Dmitrichenko <dmitrmax@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Diffstat (limited to 'drivers/usb')
-rw-r--r--drivers/usb/host/ehci-hub.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/drivers/usb/host/ehci-hub.c b/drivers/usb/host/ehci-hub.c
index 9af529d22b3e..1813b7cac294 100644
--- a/drivers/usb/host/ehci-hub.c
+++ b/drivers/usb/host/ehci-hub.c
@@ -653,8 +653,7 @@ static int ehci_hub_control (
653 if (status & ~0xffff) /* only if wPortChange is interesting */ 653 if (status & ~0xffff) /* only if wPortChange is interesting */
654#endif 654#endif
655 dbg_port (ehci, "GetStatus", wIndex + 1, temp); 655 dbg_port (ehci, "GetStatus", wIndex + 1, temp);
656 // we "know" this alignment is good, caller used kmalloc()... 656 put_unaligned(cpu_to_le32 (status), (__le32 *) buf);
657 *((__le32 *) buf) = cpu_to_le32 (status);
658 break; 657 break;
659 case SetHubFeature: 658 case SetHubFeature:
660 switch (wValue) { 659 switch (wValue) {