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 <dbrownell@users.sourceforge.net>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Index: gregkh-2.6/drivers/usb/core/hcd.h
===================================================================
* a whole, not just the root hub; they're for bus glue.
*/
/* called after all devices were suspended */
* 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);
/* called before any devices get resumed */
int (*resume) (struct usb_hcd *hcd);
extern void usb_hcd_pci_remove (struct pci_dev *dev);
#ifdef CONFIG_PM
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 */
extern int usb_hcd_pci_resume (struct pci_dev *dev);
#endif /* CONFIG_PM */
mark = ' ';
if (hw_curr == td->qtd_dma)
mark = '*';
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)
mark = '+';
else if (QTD_LENGTH (scratch)) {
if (td->hw_alt_next == ehci->async->hw_alt_next)
* the right sort of wakeup.
*/
* 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);
{
struct ehci_hcd *ehci = hcd_to_ehci (hcd);
msleep (100);
#ifdef CONFIG_USB_SUSPEND
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);
#else
usb_lock_device (hcd->self.root_hub);
(void) ehci_hub_suspend (hcd);
for (i = qh->start; i < ehci->periodic_size; i += period) {
union ehci_shadow *prev = &ehci->pshadow [i];
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;
union ehci_shadow here = *prev;
/* skip the iso nodes at list head */
while (here.ptr) {
/* skip the iso nodes at list head */
while (here.ptr) {
struct ehci_itd *itd; /* Q_TYPE_ITD */
struct ehci_sitd *sitd; /* Q_TYPE_SITD */
struct ehci_fstn *fstn; /* Q_TYPE_FSTN */
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) */
-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);
{
struct ohci_hcd *ohci = hcd_to_ohci (hcd);
msleep (100);
#ifdef CONFIG_USB_SUSPEND
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);
#else
usb_lock_device (hcd->self.root_hub);
(void) ohci_hub_suspend (hcd);
-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);
{
struct uhci_hcd *uhci = hcd_to_uhci(hcd);