]> git.karo-electronics.de Git - karo-tx-linux.git/commitdiff
HID: picoLCD: optimize for inactive debugfs
authorBruno Prémont <bonbons@linux-vserver.org>
Sun, 30 Sep 2012 20:04:19 +0000 (22:04 +0200)
committerJiri Kosina <jkosina@suse.cz>
Mon, 1 Oct 2012 08:25:01 +0000 (10:25 +0200)
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>
drivers/hid/hid-picolcd_debugfs.c

index 6ef03be352cfb98d84f2b0af9fdb31fea5e310ff..4809aa1bdb9c7551161cee1160c75d15131aca3e 100644 (file)
@@ -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);