diff options
author | Bruno Prémont <bonbons@linux-vserver.org> | 2012-09-30 16:04:19 -0400 |
---|---|---|
committer | Jiri Kosina <jkosina@suse.cz> | 2012-10-01 04:25:01 -0400 |
commit | 56fa94415b8a1a163e24a105fb5bdadc625c1d2a (patch) | |
tree | b1a91eb5032c56267427de1ea6c8859903e2a46c /drivers/hid | |
parent | 5ed84c341c25accc61410cfb53a45170f8fb19e4 (diff) |
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 'drivers/hid')
-rw-r--r-- | drivers/hid/hid-picolcd_debugfs.c | 2 |
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, | |||
402 | #define BUFF_SZ 256 | 402 | #define BUFF_SZ 256 |
403 | 403 | ||
404 | /* Avoid unnecessary overhead if debugfs is disabled */ | 404 | /* Avoid unnecessary overhead if debugfs is disabled */ |
405 | if (!hdev->debug_events) | 405 | if (list_empty(&hdev->debug_list)) |
406 | return; | 406 | return; |
407 | 407 | ||
408 | buff = kmalloc(BUFF_SZ, GFP_ATOMIC); | 408 | buff = kmalloc(BUFF_SZ, GFP_ATOMIC); |