aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/hid/hid-picolcd.c
diff options
context:
space:
mode:
authorMatthieu CASTET <matthieu.castet@parrot.com>2012-06-28 10:53:11 -0400
committerJiri Kosina <jkosina@suse.cz>2012-07-20 04:02:24 -0400
commitb94e3c94aae04a911d61f620f4ff5b575fc196ad (patch)
tree4153aa1c92ee53ab9cc9b5243e641fc9926b4366 /drivers/hid/hid-picolcd.c
parent4c7b417ecb756e85dfc955b0e7a04fd45585533e (diff)
HID: hid-core: optimize in case of hidraw
When using hidraw, hid buffer can be big and take lot's of time to process (interrupt) kernel context. Don't try to parse report if we are only interrested in hidraw. Also don't prepare data for debug stuff if no debugfs file are opened. Signed-off-by: Matthieu CASTET <matthieu.castet@parrot.com> Signed-off-by: Jiri Kosina <jkosina@suse.cz>
Diffstat (limited to 'drivers/hid/hid-picolcd.c')
-rw-r--r--drivers/hid/hid-picolcd.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/hid/hid-picolcd.c b/drivers/hid/hid-picolcd.c
index 45c3433f7986..3e0a1e5d2ad5 100644
--- a/drivers/hid/hid-picolcd.c
+++ b/drivers/hid/hid-picolcd.c
@@ -1846,7 +1846,7 @@ static void picolcd_debug_out_report(struct picolcd_data *data,
1846#define BUFF_SZ 256 1846#define BUFF_SZ 256
1847 1847
1848 /* Avoid unnecessary overhead if debugfs is disabled */ 1848 /* Avoid unnecessary overhead if debugfs is disabled */
1849 if (!hdev->debug_events) 1849 if (list_empty(&hdev->debug_list))
1850 return; 1850 return;
1851 1851
1852 buff = kmalloc(BUFF_SZ, GFP_ATOMIC); 1852 buff = kmalloc(BUFF_SZ, GFP_ATOMIC);