Merge remote-tracking branches 'regulator/topic/anatop', 'regulator/topic/arizona...
[platform/kernel/linux-rpi.git] / drivers / regulator / s2mpa01.c
index 38ee97a..48f0ca9 100644 (file)
@@ -213,7 +213,7 @@ ramp_disable:
                                  1 << enable_shift, 0);
 }
 
-static struct regulator_ops s2mpa01_ldo_ops = {
+static const struct regulator_ops s2mpa01_ldo_ops = {
        .list_voltage           = regulator_list_voltage_linear,
        .map_voltage            = regulator_map_voltage_linear,
        .is_enabled             = regulator_is_enabled_regmap,
@@ -224,7 +224,7 @@ static struct regulator_ops s2mpa01_ldo_ops = {
        .set_voltage_time_sel   = regulator_set_voltage_time_sel,
 };
 
-static struct regulator_ops s2mpa01_buck_ops = {
+static const struct regulator_ops s2mpa01_buck_ops = {
        .list_voltage           = regulator_list_voltage_linear,
        .map_voltage            = regulator_map_voltage_linear,
        .is_enabled             = regulator_is_enabled_regmap,
@@ -359,11 +359,11 @@ static int s2mpa01_pmic_probe(struct platform_device *pdev)
        if (iodev->dev->of_node) {
                reg_np = of_get_child_by_name(iodev->dev->of_node,
                                                        "regulators");
-                       if (!reg_np) {
-                               dev_err(&pdev->dev,
-                                       "could not find regulators sub-node\n");
-                               return -EINVAL;
-                       }
+               if (!reg_np) {
+                       dev_err(&pdev->dev,
+                               "could not find regulators sub-node\n");
+                       return -EINVAL;
+               }
 
                of_regulator_match(&pdev->dev, reg_np, rdata,
                                                S2MPA01_REGULATOR_MAX);