lkml.org 
[lkml]   [2014]   [Oct]   [12]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH] debugfs: add helper function to create device related seq_file
On 11-10-14 22:17, Greg Kroah-Hartman wrote:
> On Sat, Oct 11, 2014 at 06:01:55PM +0200, Arend van Spriel wrote:
>> This patch adds a helper function that simplifies adding a
>> sequence file for device drivers. The calling device driver
>> needs to provide a read function and a device pointer. The
>> field struct seq_file::private will reference the device
>> pointer upon call to the read function so the driver can
>> obtain his data from it and do its seq_printf() calls.
>>
>> Signed-off-by: Arend van Spriel <arend@broadcom.com>
>> ---
>> fs/debugfs/file.c | 54 +++++++++++++++++++++++++++++++++++++++++++++++++
>> include/linux/debugfs.h | 16 ++++++++++++++-
>> 2 files changed, 69 insertions(+), 1 deletion(-)
>
> Do you have some kernel code pending that needs this change? Or can
> existing users be moved to it, saving them code?

Yes and maybe. I made a similar change in our brcm80211 drivers, but
figured it may be useful for other device drivers. So when this gets in
the kernel I want to align the brcm80211 drivers. I will also have a
quick look at the wireless drivers and get some metrics about code savings.

Regards,
Arend


\
 
 \ /
  Last update: 2014-10-12 10:41    [W:0.594 / U:0.132 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site