From: Axel Lin <axel.lin@ingics.com>
To: Mark Brown <broonie@opensource.wolfsonmicro.com>
Cc: Milo Kim <milo.kim@ti.com>, Liam Girdwood <lgirdwood@gmail.com>,
linux-kernel@vger.kernel.org
Subject: [PATCH 1/2] regulator: lp8788: Remove lp8788_dldo_id and lp8788_aldo_id arrays
Date: Mon, 01 Apr 2013 23:26:24 +0800 [thread overview]
Message-ID: <1364829984.17176.1.camel@phoenix> (raw)
The id for DLDOx matches the entries in enum lp8788_ldo_id and it's easy to
calculate the id for ALDOx. Thus remove lp8788_dldo_id and lp8788_aldo_id
arrays.
Signed-off-by: Axel Lin <axel.lin@ingics.com>
---
drivers/regulator/lp8788-ldo.c | 32 ++------------------------------
1 file changed, 2 insertions(+), 30 deletions(-)
diff --git a/drivers/regulator/lp8788-ldo.c b/drivers/regulator/lp8788-ldo.c
index fcba90a..c29aeae 100644
--- a/drivers/regulator/lp8788-ldo.c
+++ b/drivers/regulator/lp8788-ldo.c
@@ -156,34 +156,6 @@ static const int lp8788_aldo7_vtbl[] = {
1200000, 1300000, 1400000, 1500000, 1600000, 1700000, 1800000, 1800000,
};
-static enum lp8788_ldo_id lp8788_dldo_id[] = {
- DLDO1,
- DLDO2,
- DLDO3,
- DLDO4,
- DLDO5,
- DLDO6,
- DLDO7,
- DLDO8,
- DLDO9,
- DLDO10,
- DLDO11,
- DLDO12,
-};
-
-static enum lp8788_ldo_id lp8788_aldo_id[] = {
- ALDO1,
- ALDO2,
- ALDO3,
- ALDO4,
- ALDO5,
- ALDO6,
- ALDO7,
- ALDO8,
- ALDO9,
- ALDO10,
-};
-
static int lp8788_ldo_enable_time(struct regulator_dev *rdev)
{
struct lp8788_ldo *ldo = rdev_get_drvdata(rdev);
@@ -566,7 +538,7 @@ static int lp8788_dldo_probe(struct platform_device *pdev)
return -ENOMEM;
ldo->lp = lp;
- ret = lp8788_config_ldo_enable_mode(pdev, ldo, lp8788_dldo_id[id]);
+ ret = lp8788_config_ldo_enable_mode(pdev, ldo, id);
if (ret)
return ret;
@@ -627,7 +599,7 @@ static int lp8788_aldo_probe(struct platform_device *pdev)
return -ENOMEM;
ldo->lp = lp;
- ret = lp8788_config_ldo_enable_mode(pdev, ldo, lp8788_aldo_id[id]);
+ ret = lp8788_config_ldo_enable_mode(pdev, ldo, id + ALDO1);
if (ret)
return ret;
--
1.7.10.4
next reply other threads:[~2013-04-01 15:26 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-04-01 15:26 Axel Lin [this message]
2013-04-01 15:28 ` [PATCH 2/2] regulator: lp8788: Implement list_voltage for lp8788_ldo_voltage_fixed_ops Axel Lin
2013-04-03 17:46 ` Mark Brown
2013-04-01 23:07 ` [PATCH 1/2] regulator: lp8788: Remove lp8788_dldo_id and lp8788_aldo_id arrays Kim, Milo
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=1364829984.17176.1.camel@phoenix \
--to=axel.lin@ingics.com \
--cc=broonie@opensource.wolfsonmicro.com \
--cc=lgirdwood@gmail.com \
--cc=linux-kernel@vger.kernel.org \
--cc=milo.kim@ti.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