Skip to contentSkip to conversation

HID: picoLCD: optimize for inactive debugfs

PATCH Applied Bruno Prémont 2 participants 2 messages Sep 30, 2012 – Oct 1, 2012

Subsystems (2)
lore
Share & tools
lore

Bruno Prémont

author maintainer
#0 lore raw

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.

---

drivers/hid/hid-picolcd_debugfs.c +1 -1
index 6ef03be..4809aa1 100644
@@ -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);

--
To unsubscribe from this list: send the line "unsubscribe linux-input" in the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html

Applied
#1 lore raw
Quoted 14 lines · Bruno Prémont

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.

---

drivers/hid/hid-picolcd_debugfs.c +0 -0
index 6ef03be..4809aa1 100644

drivers/hid/hid-picolcd_debugfs.c void picolcd_debug_out_report(struct picolcd_data *data, · line 408

Quoted 8 lines
drivers/hid/hid-picolcd_debugfs.c +1 -1
@@ -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.

Signature · 2 lines
Jiri Kosina
SUSE Labs