* HID: picoLCD: optimize for inactive debugfs
@ 2012-09-30 20:04 Bruno Prémont
2012-10-01 8:25 ` Jiri Kosina
0 siblings, 1 reply; 2+ messages in thread
From: Bruno Prémont @ 2012-09-30 20:04 UTC (permalink / raw)
To: Jiri Kosina; +Cc: linux-input, linux-kernel
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);
--
To unsubscribe from this list: send the line "unsubscribe linux-input" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: HID: picoLCD: optimize for inactive debugfs
2012-09-30 20:04 HID: picoLCD: optimize for inactive debugfs Bruno Prémont
@ 2012-10-01 8:25 ` Jiri Kosina
0 siblings, 0 replies; 2+ messages in thread
From: Jiri Kosina @ 2012-10-01 8:25 UTC (permalink / raw)
To: Bruno Prémont; +Cc: linux-input, linux-kernel
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
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2012-10-01 8:25 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-09-30 20:04 HID: picoLCD: optimize for inactive debugfs Bruno Prémont
2012-10-01 8:25 ` Jiri Kosina
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).