From: David Miller Date: Thu, 22 Jun 2006 05:26:09 +0000 (-0700) Subject: [PATCH] USB: OHCI hub code unaligned access X-Git-Tag: v2.6.18-rc2~97^2~36 X-Git-Url: http://www.pilppa.org/gitweb/gitweb.cgi?a=commitdiff_plain;h=92164c5dd1ade33f4e90b72e407910de6694de49;p=linux-2.6-omap-h63xx.git [PATCH] USB: OHCI hub code unaligned access I noticed this while debugging something unrelated on sparc64. Signed-off-by: David S. Miller Acked-by: David Brownell Signed-off-by: Greg Kroah-Hartman --- diff --git a/drivers/usb/host/ohci-hub.c b/drivers/usb/host/ohci-hub.c index 0bb972b5833..5b0a23fd798 100644 --- a/drivers/usb/host/ohci-hub.c +++ b/drivers/usb/host/ohci-hub.c @@ -581,14 +581,14 @@ static int ohci_hub_control ( break; case GetHubStatus: temp = roothub_status (ohci) & ~(RH_HS_CRWE | RH_HS_DRWE); - *(__le32 *) buf = cpu_to_le32 (temp); + put_unaligned(cpu_to_le32 (temp), (__le32 *) buf); break; case GetPortStatus: if (!wIndex || wIndex > ports) goto error; wIndex--; temp = roothub_portstatus (ohci, wIndex); - *(__le32 *) buf = cpu_to_le32 (temp); + put_unaligned(cpu_to_le32 (temp), (__le32 *) buf); #ifndef OHCI_VERBOSE_DEBUG if (*(u16*)(buf+2)) /* only if wPortChange is interesting */