]> git.karo-electronics.de Git - karo-tx-linux.git/blobdiff - drivers/usb/core/hcd.h
[PATCH] USB: remove usbcore-specific wakeup flags
[karo-tx-linux.git] / drivers / usb / core / hcd.h
index a5d92943ff953385feda9d68efa3585218f72a1a..7022aafb2ae8bedf9460d5c433fcea9329814251 100644 (file)
@@ -72,9 +72,12 @@ struct usb_hcd {     /* usb_bus.hcpriv points to this */
         * hardware info/state
         */
        const struct hc_driver  *driver;        /* hw-specific hooks */
-       unsigned                saw_irq : 1;
-       unsigned                can_wakeup:1;   /* hw supports wakeup? */
-       unsigned                remote_wakeup:1;/* sw should use wakeup? */
+
+       /* Flags that need to be manipulated atomically */
+       unsigned long           flags;
+#define HCD_FLAG_HW_ACCESSIBLE 0x00000001
+#define HCD_FLAG_SAW_IRQ       0x00000002
+
        unsigned                rh_registered:1;/* is root hub registered? */
 
        /* The next flag is a stopgap, to be removed when all the HCDs
@@ -351,9 +354,6 @@ extern long usb_calc_bus_time (int speed, int is_input,
 
 extern struct usb_bus *usb_alloc_bus (struct usb_operations *);
 
-extern void usb_hcd_suspend_root_hub (struct usb_hcd *hcd);
-extern void usb_hcd_resume_root_hub (struct usb_hcd *hcd);
-
 extern void usb_set_device_state(struct usb_device *udev,
                enum usb_device_state new_state);
 
@@ -362,7 +362,7 @@ extern void usb_set_device_state(struct usb_device *udev,
 /* exported only within usbcore */
 
 extern struct list_head usb_bus_list;
-extern struct semaphore usb_bus_list_lock;
+extern struct mutex usb_bus_list_lock;
 extern wait_queue_head_t usb_kill_urb_queue;
 
 extern struct usb_bus *usb_bus_get (struct usb_bus *bus);
@@ -376,9 +376,22 @@ extern int usb_find_interface_driver (struct usb_device *dev,
 #define usb_endpoint_out(ep_dir)       (!((ep_dir) & USB_DIR_IN))
 
 #ifdef CONFIG_PM
+extern void usb_hcd_suspend_root_hub (struct usb_hcd *hcd);
+extern void usb_hcd_resume_root_hub (struct usb_hcd *hcd);
+extern void usb_root_hub_lost_power (struct usb_device *rhdev);
 extern int hcd_bus_suspend (struct usb_bus *bus);
 extern int hcd_bus_resume (struct usb_bus *bus);
 #else
+static inline void usb_hcd_suspend_root_hub(struct usb_hcd *hcd)
+{
+       return;
+}
+
+static inline void usb_hcd_resume_root_hub(struct usb_hcd *hcd)
+{
+       return;
+}
+
 static inline int hcd_bus_suspend(struct usb_bus *bus)
 {
        return 0;