tree 8638550bd50ff0fdc3b097d0643b5efed3516633
parent 27d72e8572336d9f4e17a12ac924cb5223a5758d
author David Brownell <[EMAIL PROTECTED]> Tue, 19 Apr 2005 07:39:23 -0700
committer Greg K-H <[EMAIL PROTECTED]> Tue, 19 Apr 2005 07:39:23 -0700

[PATCH] USB: hcd suspend uses pm_message_t

This patch includes minor "sparse -Wbitwise" updates for the PCI based
HCDs.  Almost all of them involve just changing the second parameter of the
suspend() method to a pm_message_t ...  the others relate to how the EHCI
code walks in-memory data structures.  (There's a minor bug fixed there too
..  affecting the big-endian sysfs async schedule dump.)

Signed-off-by: David Brownell <[EMAIL PROTECTED]>
Signed-off-by: Andrew Morton <[EMAIL PROTECTED]>
Signed-off-by: Greg Kroah-Hartman <[EMAIL PROTECTED]>


Index: gregkh-2.6/drivers/usb/core/hcd.h
===================================================================

 usb/core/hcd.h        |    4 ++--
 usb/host/ehci-dbg.c   |    2 +-
 usb/host/ehci-hcd.c   |    4 ++--
 usb/host/ehci-sched.c |    4 ++--
 usb/host/ehci.h       |    2 +-
 usb/host/ohci-pci.c   |    4 ++--
 usb/host/uhci-hcd.c   |    2 +-
 7 files changed, 11 insertions(+), 11 deletions(-)

Index: drivers/usb/core/hcd.h
===================================================================
--- 791a046b5d860233f652973d0627752b67a3c600/drivers/usb/core/hcd.h  
(mode:100644 sha1:6c625b35fa0c9e5df3a27578e98d1ca854d43781)
+++ 8638550bd50ff0fdc3b097d0643b5efed3516633/drivers/usb/core/hcd.h  
(mode:100644 sha1:f67cf1e634fc51f75227ad2e0c24e512a3da2377)
@@ -177,7 +177,7 @@
         * a whole, not just the root hub; they're for bus glue.
         */
        /* called after all devices were suspended */
-       int     (*suspend) (struct usb_hcd *hcd, u32 state);
+       int     (*suspend) (struct usb_hcd *hcd, pm_message_t message);
 
        /* called before any devices get resumed */
        int     (*resume) (struct usb_hcd *hcd);
@@ -226,7 +226,7 @@
 extern void usb_hcd_pci_remove (struct pci_dev *dev);
 
 #ifdef CONFIG_PM
-extern int usb_hcd_pci_suspend (struct pci_dev *dev, u32 state);
+extern int usb_hcd_pci_suspend (struct pci_dev *dev, pm_message_t state);
 extern int usb_hcd_pci_resume (struct pci_dev *dev);
 #endif /* CONFIG_PM */
 
Index: drivers/usb/host/ehci-dbg.c
===================================================================
--- 791a046b5d860233f652973d0627752b67a3c600/drivers/usb/host/ehci-dbg.c  
(mode:100644 sha1:495e2a3ef6f1f96582e51faa3b04eb3ea4e399d8)
+++ 8638550bd50ff0fdc3b097d0643b5efed3516633/drivers/usb/host/ehci-dbg.c  
(mode:100644 sha1:9b347d765383ab947b4cee47ffbaf3bfd51078ff)
@@ -394,7 +394,7 @@
                mark = ' ';
                if (hw_curr == td->qtd_dma)
                        mark = '*';
-               else if (qh->hw_qtd_next == td->qtd_dma)
+               else if (qh->hw_qtd_next == cpu_to_le32(td->qtd_dma))
                        mark = '+';
                else if (QTD_LENGTH (scratch)) {
                        if (td->hw_alt_next == ehci->async->hw_alt_next)
Index: drivers/usb/host/ehci-hcd.c
===================================================================
--- 791a046b5d860233f652973d0627752b67a3c600/drivers/usb/host/ehci-hcd.c  
(mode:100644 sha1:a63bb792e2c7e0b6d251c7e3384b82bff48362fb)
+++ 8638550bd50ff0fdc3b097d0643b5efed3516633/drivers/usb/host/ehci-hcd.c  
(mode:100644 sha1:84d2b93aca37d51a7e13f9db9072ce76b8105372)
@@ -721,7 +721,7 @@
  * the right sort of wakeup.  
  */
 
-static int ehci_suspend (struct usb_hcd *hcd, u32 state)
+static int ehci_suspend (struct usb_hcd *hcd, pm_message_t message)
 {
        struct ehci_hcd         *ehci = hcd_to_ehci (hcd);
 
@@ -729,7 +729,7 @@
                msleep (100);
 
 #ifdef CONFIG_USB_SUSPEND
-       (void) usb_suspend_device (hcd->self.root_hub, state);
+       (void) usb_suspend_device (hcd->self.root_hub, message);
 #else
        usb_lock_device (hcd->self.root_hub);
        (void) ehci_hub_suspend (hcd);
Index: drivers/usb/host/ehci-sched.c
===================================================================
--- 791a046b5d860233f652973d0627752b67a3c600/drivers/usb/host/ehci-sched.c  
(mode:100644 sha1:f6c86354e30497b62744af46b00843b9511eb0d9)
+++ 8638550bd50ff0fdc3b097d0643b5efed3516633/drivers/usb/host/ehci-sched.c  
(mode:100644 sha1:2fa1ffee5ff3bfea6428d4fb488dff8e1ab32fec)
@@ -310,9 +310,9 @@
 
        for (i = qh->start; i < ehci->periodic_size; i += period) {
                union ehci_shadow       *prev = &ehci->pshadow [i];
-               u32                     *hw_p = &ehci->periodic [i];
+               __le32                  *hw_p = &ehci->periodic [i];
                union ehci_shadow       here = *prev;
-               u32                     type = 0;
+               __le32                  type = 0;
 
                /* skip the iso nodes at list head */
                while (here.ptr) {
Index: drivers/usb/host/ehci.h
===================================================================
--- 791a046b5d860233f652973d0627752b67a3c600/drivers/usb/host/ehci.h  
(mode:100644 sha1:67988dba9eb73dc0345186d7148d3d0b7eb2a14c)
+++ 8638550bd50ff0fdc3b097d0643b5efed3516633/drivers/usb/host/ehci.h  
(mode:100644 sha1:e763a8399a7522ee627db7c37779c4cb4c4d1c5f)
@@ -364,7 +364,7 @@
        struct ehci_itd         *itd;           /* Q_TYPE_ITD */
        struct ehci_sitd        *sitd;          /* Q_TYPE_SITD */
        struct ehci_fstn        *fstn;          /* Q_TYPE_FSTN */
-       u32                     *hw_next;       /* (all types) */
+       __le32                  *hw_next;       /* (all types) */
        void                    *ptr;
 };
 
Index: drivers/usb/host/ohci-pci.c
===================================================================
--- 791a046b5d860233f652973d0627752b67a3c600/drivers/usb/host/ohci-pci.c  
(mode:100644 sha1:b611582e6bcfb98725ae5c23213757c1844c841d)
+++ 8638550bd50ff0fdc3b097d0643b5efed3516633/drivers/usb/host/ohci-pci.c  
(mode:100644 sha1:f30118b5f9aa9b2d4151adcb714d95c9dede7694)
@@ -102,7 +102,7 @@
 
 #ifdef CONFIG_PM
 
-static int ohci_pci_suspend (struct usb_hcd *hcd, u32 state)
+static int ohci_pci_suspend (struct usb_hcd *hcd, pm_message_t message)
 {
        struct ohci_hcd         *ohci = hcd_to_ohci (hcd);
 
@@ -111,7 +111,7 @@
                msleep (100);
 
 #ifdef CONFIG_USB_SUSPEND
-       (void) usb_suspend_device (hcd->self.root_hub, state);
+       (void) usb_suspend_device (hcd->self.root_hub, message);
 #else
        usb_lock_device (hcd->self.root_hub);
        (void) ohci_hub_suspend (hcd);
Index: drivers/usb/host/uhci-hcd.c
===================================================================
--- 791a046b5d860233f652973d0627752b67a3c600/drivers/usb/host/uhci-hcd.c  
(mode:100644 sha1:324a1a9bbdb2d436207260baa99c851489687de1)
+++ 8638550bd50ff0fdc3b097d0643b5efed3516633/drivers/usb/host/uhci-hcd.c  
(mode:100644 sha1:98745a072d6fe69afa5134b33aa8aab6d70f94bb)
@@ -716,7 +716,7 @@
 }
 
 #ifdef CONFIG_PM
-static int uhci_suspend(struct usb_hcd *hcd, u32 state)
+static int uhci_suspend(struct usb_hcd *hcd, pm_message_t message)
 {
        struct uhci_hcd *uhci = hcd_to_uhci(hcd);
 
-
To unsubscribe from this list: send the line "unsubscribe bk-commits-head" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to