]> www.pilppa.org Git - linux-2.6-omap-h63xx.git/commitdiff
[PATCH] USB: OHCI hub code unaligned access
authorDavid Miller <davem@davemloft.net>
Thu, 22 Jun 2006 05:26:09 +0000 (22:26 -0700)
committerGreg Kroah-Hartman <gregkh@suse.de>
Wed, 12 Jul 2006 23:03:21 +0000 (16:03 -0700)
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>
drivers/usb/host/ohci-hub.c

index 0bb972b58336c5f01ad1fbe18f99a3dafb640a82..5b0a23fd798bb46294885432878e4c6429a660ed 100644 (file)
@@ -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 */