HID: usbhid: disable autosuspend for usb Keyboards
Petlozu Pravareshwar [Wed, 22 Jan 2014 12:35:30 +0000 (17:35 +0530)]
This change will disable the autosuspend for KBs.
This is to avoid the lag observed on the screen
while we type the characters.

Bug 1390065

Change-Id: Ic6f2247bf4e4fa2332329cd3e8dac15aad56354c
Signed-off-by: Petlozu Pravareshwar <petlozup@nvidia.com>
Signed-off-by: Eric Brower <ebrower@nvidia.com>
Reviewed-on: http://git-master/r/358743
(cherry picked from commit 8d49c2b57d7edf721933bda082374f8bcf7915c2)
Reviewed-on: http://git-master/r/378119
Reviewed-by: Automatic_Commit_Validation_User
GVS: Gerrit_Virtual_Submit
Reviewed-by: Matthew Pedro <mapedro@nvidia.com>

drivers/hid/usbhid/hid-core.c

index b89d9d6..006267f 100644 (file)
@@ -6,7 +6,7 @@
  *  Copyright (c) 2005 Michael Haboustak <mike-@cinci.rr.com> for Concept2, Inc
  *  Copyright (c) 2007-2008 Oliver Neukum
  *  Copyright (c) 2006-2010 Jiri Kosina
- *  Copyright (c) 2013, NVIDIA CORPORATION.  All rights reserved.
+ *  Copyright (c) 2013-2014, NVIDIA CORPORATION.  All rights reserved.
  */
 
 /*
@@ -1183,6 +1183,7 @@ static int usbhid_start(struct hid_device *hid)
                                USB_INTERFACE_PROTOCOL_KEYBOARD) {
                usbhid_set_leds(hid);
                device_set_wakeup_enable(&dev->dev, 1);
+               usb_disable_autosuspend(dev);
        }
 #ifdef CONFIG_USB_EHCI_TEGRA
        else if (interface->desc.bInterfaceProtocol ==