summaryrefslogtreecommitdiffstats
path: root/drivers/usb/misc/usbtest.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/usb/misc/usbtest.c')
-rw-r--r--drivers/usb/misc/usbtest.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/drivers/usb/misc/usbtest.c b/drivers/usb/misc/usbtest.c
index 17100471e46..2c4fd4d6df9 100644
--- a/drivers/usb/misc/usbtest.c
+++ b/drivers/usb/misc/usbtest.c
@@ -1564,7 +1564,8 @@ usbtest_ioctl (struct usb_interface *intf, unsigned int code, void *buf)
if (mutex_lock_interruptible(&dev->lock))
return -ERESTARTSYS;
- if (intf->dev.power.power_state.event != PM_EVENT_ON) {
+ /* FIXME: What if a system sleep starts while a test is running? */
+ if (!intf->is_active) {
mutex_unlock(&dev->lock);
return -EHOSTUNREACH;
}