From davem@davemloft.net Wed Jun 21 22:26:19 2006 Date: Wed, 21 Jun 2006 22:26:09 -0700 (PDT) From: David Miller Message-Id: <20060621.222609.07641180.davem@davemloft.net> To: gregkh@suse.de Subject: 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 --- drivers/usb/host/ohci-hub.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) --- gregkh-2.6.orig/drivers/usb/host/ohci-hub.c +++ gregkh-2.6/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 */