lkml.org 
[lkml]   [2015]   [Jun]   [23]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH 1/1] regmap: debugfs: Allow writes to cache state settings
On Mon, Jun 22, 2015 at 05:10:44PM +0100, Richard Fitzgerald wrote:
> On Mon, Jun 22, 2015 at 04:49:15PM +0100, Mark Brown wrote:

> > Can we not export read/write_file_bool() instead? For the read this
> > seems to be an almost cut'n'paste with slight differences that look
> > like taste changes. For the write path we can just stash the current
> > value in the calling functions instead of cut'n'pasting the code.

> They assume that file->private_data points at the actual bool, and
> it doesn't here, which means temporarily patching it around the call.

Or you could use container_of() in your wrappers for the write path.
[unhandled content-type:application/pgp-signature]
\
 
 \ /
  Last update: 2015-06-23 12:41    [W:0.033 / U:0.184 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site