aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/usb/host/ohci-hub.c
diff options
context:
space:
mode:
authorDavid Miller <davem@davemloft.net>2006-06-22 01:26:09 -0400
committerGreg Kroah-Hartman <gregkh@suse.de>2006-07-12 19:03:21 -0400
commit92164c5dd1ade33f4e90b72e407910de6694de49 (patch)
tree951015d3e6d5391c35346f0e45c981066452d525 /drivers/usb/host/ohci-hub.c
parentc0f8d56197f7d15f841e7d9d6f88909f4feba678 (diff)
[PATCH] USB: OHCI hub code unaligned access
I noticed this while debugging something unrelated on sparc64. Signed-off-by: David S. Miller <davem@davemloft.net> Acked-by: David Brownell <david-b@pacbell.net> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Diffstat (limited to 'drivers/usb/host/ohci-hub.c')
-rw-r--r--drivers/usb/host/ohci-hub.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/usb/host/ohci-hub.c b/drivers/usb/host/ohci-hub.c
index 0bb972b58336..5b0a23fd798b 100644
--- a/drivers/usb/host/ohci-hub.c
+++ b/drivers/usb/host/ohci-hub.c
@@ -581,14 +581,14 @@ static int ohci_hub_control (
581 break; 581 break;
582 case GetHubStatus: 582 case GetHubStatus:
583 temp = roothub_status (ohci) & ~(RH_HS_CRWE | RH_HS_DRWE); 583 temp = roothub_status (ohci) & ~(RH_HS_CRWE | RH_HS_DRWE);
584 *(__le32 *) buf = cpu_to_le32 (temp); 584 put_unaligned(cpu_to_le32 (temp), (__le32 *) buf);
585 break; 585 break;
586 case GetPortStatus: 586 case GetPortStatus:
587 if (!wIndex || wIndex > ports) 587 if (!wIndex || wIndex > ports)
588 goto error; 588 goto error;
589 wIndex--; 589 wIndex--;
590 temp = roothub_portstatus (ohci, wIndex); 590 temp = roothub_portstatus (ohci, wIndex);
591 *(__le32 *) buf = cpu_to_le32 (temp); 591 put_unaligned(cpu_to_le32 (temp), (__le32 *) buf);
592 592
593#ifndef OHCI_VERBOSE_DEBUG 593#ifndef OHCI_VERBOSE_DEBUG
594 if (*(u16*)(buf+2)) /* only if wPortChange is interesting */ 594 if (*(u16*)(buf+2)) /* only if wPortChange is interesting */