From: Axel Lin <axel.lin@ingics.com>
To: Mark Brown <broonie@opensource.wolfsonmicro.com>
Cc: Liam Girdwood <lgirdwood@gmail.com>,
patches@opensource.wolfsonmicro.com,
linux-kernel@vger.kernel.org
Subject: [PATCH 2/2] regulator: wm8994: Merge wm8994_ldo1_ops and wm8994_ldo2_ops
Date: Fri, 18 Jan 2013 11:59:32 +0800 [thread overview]
Message-ID: <1358481572.25899.7.camel@phoenix> (raw)
In-Reply-To: <1358481513.25899.6.camel@phoenix>
wm8994_ldo1_ops and wm8994_ldo2_ops are the same after converting
wm8994_ldo2_ops to use regulator_list_voltage_linear, merge them.
Signed-off-by: Axel Lin <axel.lin@ingics.com>
---
drivers/regulator/wm8994-regulator.c | 13 +++----------
1 file changed, 3 insertions(+), 10 deletions(-)
diff --git a/drivers/regulator/wm8994-regulator.c b/drivers/regulator/wm8994-regulator.c
index fef2692..98edfe0 100644
--- a/drivers/regulator/wm8994-regulator.c
+++ b/drivers/regulator/wm8994-regulator.c
@@ -32,14 +32,7 @@ struct wm8994_ldo {
#define WM8994_LDO1_MAX_SELECTOR 0x7
#define WM8994_LDO2_MAX_SELECTOR 0x3
-static struct regulator_ops wm8994_ldo1_ops = {
- .list_voltage = regulator_list_voltage_linear,
- .map_voltage = regulator_map_voltage_linear,
- .get_voltage_sel = regulator_get_voltage_sel_regmap,
- .set_voltage_sel = regulator_set_voltage_sel_regmap,
-};
-
-static struct regulator_ops wm8994_ldo2_ops = {
+static struct regulator_ops wm8994_ldo_ops = {
.list_voltage = regulator_list_voltage_linear,
.map_voltage = regulator_map_voltage_linear,
.get_voltage_sel = regulator_get_voltage_sel_regmap,
@@ -54,7 +47,7 @@ static struct regulator_desc wm8994_ldo_desc[] = {
.n_voltages = WM8994_LDO1_MAX_SELECTOR + 1,
.vsel_reg = WM8994_LDO_1,
.vsel_mask = WM8994_LDO1_VSEL_MASK,
- .ops = &wm8994_ldo1_ops,
+ .ops = &wm8994_ldo_ops,
.min_uV = 2400000,
.uV_step = 100000,
.enable_time = 3000,
@@ -67,7 +60,7 @@ static struct regulator_desc wm8994_ldo_desc[] = {
.n_voltages = WM8994_LDO2_MAX_SELECTOR + 1,
.vsel_reg = WM8994_LDO_2,
.vsel_mask = WM8994_LDO2_VSEL_MASK,
- .ops = &wm8994_ldo2_ops,
+ .ops = &wm8994_ldo_ops,
.enable_time = 3000,
.owner = THIS_MODULE,
},
--
1.7.9.5
next prev parent reply other threads:[~2013-01-18 3:59 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-01-18 3:58 [PATCH 1/2] regulator: wm8994: Convert wm8994_ldo2_ops to use regulator_list_voltage_linear Axel Lin
2013-01-18 3:59 ` Axel Lin [this message]
2013-01-18 6:13 ` 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=1358481572.25899.7.camel@phoenix \
--to=axel.lin@ingics.com \
--cc=broonie@opensource.wolfsonmicro.com \
--cc=lgirdwood@gmail.com \
--cc=linux-kernel@vger.kernel.org \
--cc=patches@opensource.wolfsonmicro.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;
as well as URLs for NNTP newsgroup(s).