From: Mark Brown <broonie@kernel.org>
To: Srinivas KANDAGATLA <srinivas.kandagatla@st.com>
Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
linux-kernel@vger.kernel.org
Subject: Re: [RFC] regmap: Add regmap_field APIs
Date: Wed, 5 Jun 2013 12:41:40 +0100 [thread overview]
Message-ID: <20130605114140.GW31367@sirena.org.uk> (raw)
In-Reply-To: <51AF0313.6000205@st.com>
[-- Attachment #1: Type: text/plain, Size: 982 bytes --]
On Wed, Jun 05, 2013 at 10:21:23AM +0100, Srinivas KANDAGATLA wrote:
> Is it ok if we rename the regmap_field_init function to
> regmap_field_alloc, as it will make it obvious that its allocating
> memory which should be freed?
> I also thought we could add devm version of it as well.
Yes, that's all sensible.
> With this change here is what the init/alloc function would look like:
> static void _regmap_field_init(struct regmap_field *field,
> struct regmap *regmap, unsigned int reg,
> unsigned int lsb, unsigned int msb)
> struct regmap_field *devm_regmap_field_alloc(struct device *dev,
> struct regmap *regmap, unsigned int reg,
> unsigned int lsb, unsigned int msb)
I think I'd prefer to see a struct passed in here for the field
definition - this would make it easier to initialise from static data,
otherwise people will end up writing a loop that reads from a locally
defined struct once they get more than a couple of fields.
Otherwise this makes sense.
[-- Attachment #2: Digital signature --]
[-- Type: application/pgp-signature, Size: 836 bytes --]
next prev parent reply other threads:[~2013-06-05 11:42 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-05-28 14:58 Srinivas KANDAGATLA
2013-05-31 6:31 ` Srinivas KANDAGATLA
2013-06-01 18:38 ` Mark Brown
2013-06-04 21:01 ` Mark Brown
2013-06-05 9:21 ` Srinivas KANDAGATLA
2013-06-05 11:41 ` Mark Brown [this message]
2013-06-05 14:41 ` Srinivas KANDAGATLA
2013-06-05 15:59 ` Mark Brown
2013-06-09 16:00 ` Lars-Peter Clausen
2013-06-10 7:09 ` Srinivas KANDAGATLA
2013-06-10 9:15 ` Mark Brown
2013-06-10 10:27 ` Srinivas KANDAGATLA
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20130605114140.GW31367@sirena.org.uk \
--to=broonie@kernel.org \
--cc=gregkh@linuxfoundation.org \
--cc=linux-kernel@vger.kernel.org \
--cc=srinivas.kandagatla@st.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®