From d26b1d741477eacd7e9858fad77f8d713e632916 Mon Sep 17 00:00:00 2001 From: Alan Stern Date: Sat, 1 Jul 2006 22:11:44 -0400 Subject: [PATCH] --- yaml --- r: 36377 b: refs/heads/master c: 4d064c080265a41324d108fccc26b72106d43db3 h: refs/heads/master i: 36375: 7e0f4c30dbffedf90d5210b012c43c4bccd5be78 v: v3 --- [refs] | 2 +- trunk/drivers/usb/core/usb.h | 6 +++--- trunk/include/linux/usb.h | 3 +++ 3 files changed, 7 insertions(+), 4 deletions(-) diff --git a/[refs] b/[refs] index ef7eeddc3f7e..472cd4c4128c 100644 --- a/[refs] +++ b/[refs] @@ -1,2 +1,2 @@ --- -refs/heads/master: a8e7c5653562f88c0f5f53eac0a890c012655789 +refs/heads/master: 4d064c080265a41324d108fccc26b72106d43db3 diff --git a/trunk/drivers/usb/core/usb.h b/trunk/drivers/usb/core/usb.h index cc42972b6bb0..74df0db954c9 100644 --- a/trunk/drivers/usb/core/usb.h +++ b/trunk/drivers/usb/core/usb.h @@ -59,17 +59,17 @@ static inline int is_usb_device_driver(struct device_driver *drv) static inline void mark_active(struct usb_interface *f) { - f->dev.power.power_state.event = PM_EVENT_ON; + f->is_active = 1; } static inline void mark_quiesced(struct usb_interface *f) { - f->dev.power.power_state.event = PM_EVENT_FREEZE; + f->is_active = 0; } static inline int is_active(struct usb_interface *f) { - return f->dev.power.power_state.event == PM_EVENT_ON; + return f->is_active; } diff --git a/trunk/include/linux/usb.h b/trunk/include/linux/usb.h index b4ccce6d0982..e22f4b386605 100644 --- a/trunk/include/linux/usb.h +++ b/trunk/include/linux/usb.h @@ -102,6 +102,7 @@ enum usb_interface_condition { * number from the USB core by calling usb_register_dev(). * @condition: binding state of the interface: not bound, binding * (in probe()), bound to a driver, or unbinding (in disconnect()) + * @is_active: flag set when the interface is bound and not suspended. * @dev: driver model's view of this device * @class_dev: driver model's class view of this device. * @@ -142,6 +143,8 @@ struct usb_interface { int minor; /* minor number this interface is * bound to */ enum usb_interface_condition condition; /* state of binding */ + unsigned is_active:1; /* the interface is not suspended */ + struct device dev; /* interface specific device info */ struct class_device *class_dev; };