regulator: rk808: remove unused rk808_reg_ops_ranges
authorArnd Bergmann <arnd@arndb.de>
Tue, 26 Apr 2016 09:19:26 +0000 (11:19 +0200)
committerMark Brown <broonie@kernel.org>
Tue, 26 Apr 2016 10:11:29 +0000 (11:11 +0100)
After removing all uses of the range operations in a recent patch,
we get a warning about the symbol not being referenced anywhere:

drivers/regulator/rk808-regulator.c:306:29: 'rk808_reg_ops_ranges' defined but not used

This removes the now-unused structure along with the
rk808_set_suspend_voltage_range function that is only referenced from
rk808_reg_ops_ranges.

Fixes: afcd666d9db0 ("regulator: rk808: remove linear range definitions with a single range")
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Signed-off-by: Mark Brown <broonie@kernel.org>
drivers/regulator/rk808-regulator.c

index 964b95eed2710376bcb04ff064efb265c06f83b1..67f72feed8158a1fb2db2de62672e6bfa374e2a7 100644 (file)
@@ -238,21 +238,6 @@ static int rk808_set_suspend_voltage(struct regulator_dev *rdev, int uv)
                                  sel);
 }
 
-static int rk808_set_suspend_voltage_range(struct regulator_dev *rdev, int uv)
-{
-       unsigned int reg;
-       int sel = regulator_map_voltage_linear_range(rdev, uv, uv);
-
-       if (sel < 0)
-               return -EINVAL;
-
-       reg = rdev->desc->vsel_reg + RK808_SLP_REG_OFFSET;
-
-       return regmap_update_bits(rdev->regmap, reg,
-                                 rdev->desc->vsel_mask,
-                                 sel);
-}
-
 static int rk808_set_suspend_enable(struct regulator_dev *rdev)
 {
        unsigned int reg;
@@ -303,19 +288,6 @@ static struct regulator_ops rk808_reg_ops = {
        .set_suspend_disable    = rk808_set_suspend_disable,
 };
 
-static struct regulator_ops rk808_reg_ops_ranges = {
-       .list_voltage           = regulator_list_voltage_linear_range,
-       .map_voltage            = regulator_map_voltage_linear_range,
-       .get_voltage_sel        = regulator_get_voltage_sel_regmap,
-       .set_voltage_sel        = regulator_set_voltage_sel_regmap,
-       .enable                 = regulator_enable_regmap,
-       .disable                = regulator_disable_regmap,
-       .is_enabled             = regulator_is_enabled_regmap,
-       .set_suspend_voltage    = rk808_set_suspend_voltage_range,
-       .set_suspend_enable     = rk808_set_suspend_enable,
-       .set_suspend_disable    = rk808_set_suspend_disable,
-};
-
 static struct regulator_ops rk808_switch_ops = {
        .enable                 = regulator_enable_regmap,
        .disable                = regulator_disable_regmap,