[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <20150623102651.GZ14071@sirena.org.uk>
Date: Tue, 23 Jun 2015 11:26:51 +0100
From: Mark Brown <broonie@...nel.org>
To: Richard Fitzgerald <rf@...nsource.wolfsonmicro.com>
Cc: gregkh@...uxfoundation.org, patches@...nsource.wolfsonmicro.com,
linux-kernel@...r.kernel.org
Subject: Re: [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.
Download attachment "signature.asc" of type "application/pgp-signature" (474 bytes)
Powered by blists - more mailing lists