From: Mark Brown <broonie@opensource.wolfsonmicro.com>
To: Kukjin Kim <kgene.kim@samsung.com>
Cc: 'Liam Girdwood' <lrg@slimlogic.co.uk>,
linux-samsung-soc@vger.kernel.org, kyungmin.park@samsung.com,
'MyungJoo Ham' <myungjoo.ham@samsung.com>,
myungjoo.ham@gmail.com, linux-arm-kernel@lists.infradead.org,
'Changhwan Youn' <chaos.youn@samsung.com>
Subject: Re: [PATCH v2] MAX8952 PMIC Driver Initial Release
Date: Wed, 1 Sep 2010 10:48:26 +0100 [thread overview]
Message-ID: <20100901094826.GA28490@sirena.org.uk> (raw)
In-Reply-To: <000801cb49ba$3e1e50f0$ba5af2d0$%kim@samsung.com>
On Wed, Sep 01, 2010 at 06:44:11PM +0900, Kukjin Kim wrote:
> MM...but I'm not sure if I can submit other patch for max8952...
> Actually, Mr. Ham's max8952 code has been applied by Liam.
We can always remove that if it makes more sense to combine the code.
> - return (MAX8649_DCDC_VMIN + index * MAX8649_DCDC_STEP);
> + struct max8649_regulator_info *info = rdev_get_drvdata(rdev);
> + int ret = MAX8649_DCDC_VMIN + index * MAX8649_DCDC_STEP;
> +
> + if (!strcmp(info->i2c->name, "max8952"))
Rather than doing a strcmp on the name you should use the id field here:
> static const struct i2c_device_id max8649_id[] = {
> { "max8649", 0 },
> + { "max8952", 0 },
> { }
> };
to pass in a value which you compare against. While it's probably not a
performance issue on this chip this is much clearer and more idiomatic.
next prev parent reply other threads:[~2010-09-01 9:48 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-08-20 5:43 [PATCH v2] MAX8952 PMIC Driver Initial Release MyungJoo Ham
2010-08-20 9:53 ` Mark Brown
2010-08-20 10:47 ` Liam Girdwood
2010-09-01 0:15 ` Kukjin Kim
2010-09-01 9:15 ` Mark Brown
2010-09-01 9:44 ` Kukjin Kim
2010-09-01 9:48 ` Mark Brown [this message]
2010-09-01 10:05 ` Kukjin Kim
2010-09-01 10:12 ` Kyungmin Park
2010-09-01 10:27 ` Kukjin Kim
2010-09-01 10:36 ` Kyungmin Park
2010-09-01 11:16 ` Mark Brown
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=20100901094826.GA28490@sirena.org.uk \
--to=broonie@opensource.wolfsonmicro.com \
--cc=chaos.youn@samsung.com \
--cc=kgene.kim@samsung.com \
--cc=kyungmin.park@samsung.com \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-samsung-soc@vger.kernel.org \
--cc=lrg@slimlogic.co.uk \
--cc=myungjoo.ham@gmail.com \
--cc=myungjoo.ham@samsung.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