From: Axel Lin <axel.lin@ingics.com>
To: Mark Brown <broonie@opensource.wolfsonmicro.com>
Cc: Bengt Jonsson <bengt.g.jonsson@stericsson.com>,
Lee Jones <lee.jones@linaro.org>,
Yvan FILLION <yvan.fillion@stericsson.com>,
Liam Girdwood <lgirdwood@gmail.com>,
linux-kernel@vger.kernel.org
Subject: [PATCH 3/4] regulator: ab8500-ext: Remove unnecessary checking for ab9540 and ab8540
Date: Sun, 07 Apr 2013 23:15:24 +0800 [thread overview]
Message-ID: <1365347724.9931.5.camel@phoenix> (raw)
In-Reply-To: <1365347548.9931.1.camel@phoenix>
This code was added by commit 0fe17e20a6
"regulator: ab8500-ext: Add support for AB9540 regulators"
and commit bd44e2cb "regulator: ab8500: Also check for AB8505 based platforms"
The original patch[1] is to set info->desc.ops = &ab9540_ext_regulator_ops.
However, ab9540_ext_regulator_ops is identical to ab8500_ext_regulator_ops[2].
Thus we can complete remove the unnecessary checking for ab9540 and ab8540.
[1] https://lkml.org/lkml/2013/3/28/333
[2] https://lkml.org/lkml/2013/4/1/178
Signed-off-by: Axel Lin <axel.lin@ingics.com>
---
drivers/regulator/ab8500-ext.c | 7 -------
1 file changed, 7 deletions(-)
diff --git a/drivers/regulator/ab8500-ext.c b/drivers/regulator/ab8500-ext.c
index 5e604a2..c7896af 100644
--- a/drivers/regulator/ab8500-ext.c
+++ b/drivers/regulator/ab8500-ext.c
@@ -389,15 +389,8 @@ int ab8500_ext_regulator_init(struct platform_device *pdev)
config.init_data = &pdata->ext_regulator[i];
config.driver_data = info;
- if ((is_ab9540(ab8500) || is_ab8540(ab8500)) &&
- ((info->desc.id == AB8500_EXT_SUPPLY1) ||
- (info->desc.id == AB8500_EXT_SUPPLY2) ||
- (info->desc.id == AB8500_EXT_SUPPLY3)))
- info->desc.ops = &ab8500_ext_regulator_ops;
-
/* register regulator with framework */
info->rdev = regulator_register(&info->desc, &config);
-
if (IS_ERR(info->rdev)) {
err = PTR_ERR(info->rdev);
dev_err(&pdev->dev, "failed to register regulator %s\n",
--
1.7.10.4
next prev parent reply other threads:[~2013-04-07 15:15 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-04-07 15:12 [PATCH 1/4] regulator: ab8500: Get rid of is_enabled from struct ab8500_regulator_info Axel Lin
2013-04-07 15:13 ` [PATCH 2/4] regulator: ab8500-ext: Get rid of is_enabled from struct ab8500_ext_regulator_info Axel Lin
2013-04-08 7:54 ` Lee Jones
2013-04-07 15:15 ` Axel Lin [this message]
2013-04-07 15:17 ` [PATCH 4/4] regulator: ab8500-ext: Remove get_voltage to avoid duplicate implementation Axel Lin
2013-04-08 7:53 ` Lee Jones
2013-04-08 7:52 ` [PATCH 1/4] regulator: ab8500: Get rid of is_enabled from struct ab8500_regulator_info Lee Jones
2013-04-08 10:24 ` 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=1365347724.9931.5.camel@phoenix \
--to=axel.lin@ingics.com \
--cc=bengt.g.jonsson@stericsson.com \
--cc=broonie@opensource.wolfsonmicro.com \
--cc=lee.jones@linaro.org \
--cc=lgirdwood@gmail.com \
--cc=linux-kernel@vger.kernel.org \
--cc=yvan.fillion@stericsson.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.