diff options
author | Bruno Prémont <bonbons@linux-vserver.org> | 2012-08-19 13:33:02 -0400 |
---|---|---|
committer | Jiri Kosina <jkosina@suse.cz> | 2012-09-05 05:48:07 -0400 |
commit | 63583c64558853f0fe7f8166907417792d184e18 (patch) | |
tree | f77dee08c6f833a64016ec993fe85222e0fd27ee /drivers/hid/hid-picolcd_debugfs.c | |
parent | ae08e324146c89f1059e9d3c3898d0260a988795 (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.
Do the same on the more important picolcd_debug_raw_event() that is
called in interrupt context as opposed to picolcd_debug_out_report()
which happens in whichever context that sends reports to device.
Signed-off-by: Bruno Prémont <bonbons@linux-vserver.org>
Signed-off-by: Jiri Kosina <jkosina@suse.cz>
Diffstat (limited to 'drivers/hid/hid-picolcd_debugfs.c')
-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 15c22f2ee748..2c7308c2ae1f 100644 --- a/drivers/hid/hid-picolcd_debugfs.c +++ b/drivers/hid/hid-picolcd_debugfs.c | |||
@@ -657,7 +657,7 @@ void picolcd_debug_raw_event(struct picolcd_data *data, | |||
657 | 657 | ||
658 | #define BUFF_SZ 256 | 658 | #define BUFF_SZ 256 |
659 | /* Avoid unnecessary overhead if debugfs is disabled */ | 659 | /* Avoid unnecessary overhead if debugfs is disabled */ |
660 | if (!hdev->debug_events) | 660 | if (list_empty(&hdev->debug_list)) |
661 | return; | 661 | return; |
662 | 662 | ||
663 | buff = kmalloc(BUFF_SZ, GFP_ATOMIC); | 663 | buff = kmalloc(BUFF_SZ, GFP_ATOMIC); |