Re: HID: picoLCD: optimize for inactive debugfs
From: Jiri Kosina <hidden>
Date: 2012-10-01 08:26:03
Also in:
lkml
From: Jiri Kosina <hidden>
Date: 2012-10-01 08:26:03
Also in:
lkml
On Sun, 30 Sep 2012, Bruno Prémont wrote:
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> ---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);
Applied, thanks. -- Jiri Kosina SUSE Labs