diff options
author | Bruno Prémont <bonbons@linux-vserver.org> | 2012-09-30 22:04:19 +0200 |
---|---|---|
committer | Jiri Kosina <jkosina@suse.cz> | 2012-10-01 10:25:01 +0200 |
commit | 56fa94415b8a1a163e24a105fb5bdadc625c1d2a (patch) | |
tree | b1a91eb5032c56267427de1ea6c8859903e2a46c /drivers/hid | |
parent | 5ed84c341c25accc61410cfb53a45170f8fb19e4 (diff) | |
download | op-kernel-dev-56fa94415b8a1a163e24a105fb5bdadc625c1d2a.zip op-kernel-dev-56fa94415b8a1a163e24a105fb5bdadc625c1d2a.tar.gz |
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 6ef03be..4809aa1 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); |