HID: usbhid: remove LED_ON
authorDaniel Kurtz <djkurtz@chromium.org>
Thu, 17 Nov 2011 11:23:48 +0000 (19:23 +0800)
committerJiri Kosina <jkosina@suse.cz>
Wed, 21 Dec 2011 10:18:35 +0000 (11:18 +0100)
LED_ON was defined in the original version of the hid-core autosuspend patch.
However, during review, the setting and clearing of it was redone
using ledcount.  The test was left in accidentally.

Signed-off-by: Daniel Kurtz <djkurtz@chromium.org>
Acked-by: Oliver Neukum <oneukum@suse.de>
Signed-off-by: Jiri Kosina <jkosina@suse.cz>
drivers/hid/usbhid/hid-core.c
drivers/hid/usbhid/usbhid.h

index b403fcef0b8693fbeb3eb44c9d80fd8735757060..66061349be8781cb23ca2f50d3a64feb54197dc1 100644 (file)
@@ -1367,16 +1367,6 @@ static int hid_suspend(struct usb_interface *intf, pm_message_t message)
                        return -EIO;
        }
 
-       if (!ignoreled && PMSG_IS_AUTO(message)) {
-               spin_lock_irq(&usbhid->lock);
-               if (test_bit(HID_LED_ON, &usbhid->iofl)) {
-                       spin_unlock_irq(&usbhid->lock);
-                       usbhid_mark_busy(usbhid);
-                       return -EBUSY;
-               }
-               spin_unlock_irq(&usbhid->lock);
-       }
-
        hid_cancel_delayed_stuff(usbhid);
        hid_cease_io(usbhid);
 
index 1673cac93d77bfa22aba124c0a17ce6cc5c05e56..2d8957c11d2d307457b06c5873035a77c7aff225 100644 (file)
@@ -55,7 +55,6 @@ struct usb_interface *usbhid_find_interface(int minor);
 #define HID_STARTED            8
 #define HID_REPORTED_IDLE      9
 #define HID_KEYS_PRESSED       10
-#define HID_LED_ON             11
 
 /*
  * USB-specific HID struct, to be pointed to