[<prev] [next>] [day] [month] [year] [list]
Message-Id: <E1ZMIWP-0003uy-Bu@finisterre>
Date: Mon, 03 Aug 2015 17:23:29 +0100
From: Mark Brown <broonie@...nel.org>
To: Axel Lin <axel.lin@...ics.com>, Mark Brown <broonie@...nel.org>
Cc: linux-kernel@...r.kernel.org
Subject: Applied "regulator: mt6311: Trivial clean up" to the regulator tree
The patch
regulator: mt6311: Trivial clean up
has been applied to the regulator tree at
git://git.kernel.org/pub/scm/linux/kernel/git/broonie/regulator.git
All being well this means that it will be integrated into the linux-next
tree (usually sometime in the next 24 hours) and sent to Linus during
the next merge window (or sooner if it is a bug fix), however if
problems are discovered then the patch may be dropped or reverted.
You may get further e-mails resulting from automated or manual testing
and review of the tree, please engage with people reporting problems and
send followup patches addressing any issues that are reported if needed.
If any updates are required or you are submitting further changes they
should be sent as incremental updates against current git, existing
patches will not be replaced.
Please add any relevant lists and maintainers to the CCs when replying
to this mail.
Thanks,
Mark
>From 08b472f7b602c60c69f278ba1e15535f5c86ee24 Mon Sep 17 00:00:00 2001
From: Axel Lin <axel.lin@...ics.com>
Date: Thu, 30 Jul 2015 21:06:43 +0800
Subject: [PATCH] regulator: mt6311: Trivial clean up
Make mt6311_buck_ops, mt6311_ldo_ops and mt6311_regulators const and remove
unneeded error variable in mt6311_i2c_probe().
Signed-off-by: Axel Lin <axel.lin@...ics.com>
Signed-off-by: Mark Brown <broonie@...nel.org>
---
drivers/regulator/mt6311-regulator.c | 14 +++++++-------
1 file changed, 7 insertions(+), 7 deletions(-)
diff --git a/drivers/regulator/mt6311-regulator.c b/drivers/regulator/mt6311-regulator.c
index b140da0..2c2c85b 100644
--- a/drivers/regulator/mt6311-regulator.c
+++ b/drivers/regulator/mt6311-regulator.c
@@ -41,7 +41,7 @@ static const struct regulator_linear_range buck_volt_range[] = {
REGULATOR_LINEAR_RANGE(MT6311_MIN_UV, 0, 0x7f, MT6311_STEP_UV),
};
-static struct regulator_ops mt6311_buck_ops = {
+static const struct regulator_ops mt6311_buck_ops = {
.list_voltage = regulator_list_voltage_linear_range,
.map_voltage = regulator_map_voltage_linear_range,
.set_voltage_sel = regulator_set_voltage_sel_regmap,
@@ -52,7 +52,7 @@ static struct regulator_ops mt6311_buck_ops = {
.is_enabled = regulator_is_enabled_regmap,
};
-static struct regulator_ops mt6311_ldo_ops = {
+static const struct regulator_ops mt6311_ldo_ops = {
.enable = regulator_enable_regmap,
.disable = regulator_disable_regmap,
.is_enabled = regulator_is_enabled_regmap,
@@ -91,7 +91,7 @@ static struct regulator_ops mt6311_ldo_ops = {
.enable_mask = MT6311_PMIC_RG_VBIASN_EN_MASK,\
}
-static struct regulator_desc mt6311_regulators[] = {
+static const struct regulator_desc mt6311_regulators[] = {
MT6311_BUCK(VDVFS),
MT6311_LDO(VBIASN),
};
@@ -105,15 +105,15 @@ static int mt6311_i2c_probe(struct i2c_client *i2c,
struct regulator_config config = { };
struct regulator_dev *rdev;
struct regmap *regmap;
- int error, i, ret;
+ int i, ret;
unsigned int data;
regmap = devm_regmap_init_i2c(i2c, &mt6311_regmap_config);
if (IS_ERR(regmap)) {
- error = PTR_ERR(regmap);
+ ret = PTR_ERR(regmap);
dev_err(&i2c->dev, "Failed to allocate register map: %d\n",
- error);
- return error;
+ ret);
+ return ret;
}
ret = regmap_read(regmap, MT6311_SWCID, &data);
--
2.1.4
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists