summaryrefslogtreecommitdiffstats
path: root/drivers/hid/hid-picolcd_debugfs.c
diff options
context:
space:
mode:
authorBruno Prémont <bonbons@linux-vserver.org>2012-09-30 22:04:19 +0200
committerJiri Kosina <jkosina@suse.cz>2012-10-01 10:25:01 +0200
commit56fa94415b8a1a163e24a105fb5bdadc625c1d2a (patch)
treeb1a91eb5032c56267427de1ea6c8859903e2a46c /drivers/hid/hid-picolcd_debugfs.c
parentHID: picoLCD: bounds check in dump_buff_as_hex() (diff)
downloadlinux-56fa94415b8a1a163e24a105fb5bdadc625c1d2a.tar.xz
linux-56fa94415b8a1a163e24a105fb5bdadc625c1d2a.zip
HID: picoLCD: optimize for inactive debugfs
Matthieu CASTET adjusted picolcd_debug_out_report() to only operate when there is an active listener on debugfs for events. His change got lost while splitting hid_picolcd.c, restore it. Signed-off-by: Bruno Prémont <bonbons@linux-vserver.org> Signed-off-by: Jiri Kosina <jkosina@suse.cz>
Diffstat (limited to '')
-rw-r--r--drivers/hid/hid-picolcd_debugfs.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/hid/hid-picolcd_debugfs.c b/drivers/hid/hid-picolcd_debugfs.c
index 6ef03be352cf..4809aa1bdb9c 100644
--- a/drivers/hid/hid-picolcd_debugfs.c
+++ b/drivers/hid/hid-picolcd_debugfs.c
@@ -402,7 +402,7 @@ void picolcd_debug_out_report(struct picolcd_data *data,
#define BUFF_SZ 256
/* Avoid unnecessary overhead if debugfs is disabled */
- if (!hdev->debug_events)
+ if (list_empty(&hdev->debug_list))
return;
buff = kmalloc(BUFF_SZ, GFP_ATOMIC);