Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 56fa9441 authored by Bruno Prémont's avatar Bruno Prémont Committed by Jiri Kosina
Browse files

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: default avatarBruno Prémont <bonbons@linux-vserver.org>
Signed-off-by: default avatarJiri Kosina <jkosina@suse.cz>
parent 5ed84c34
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -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);