]> git.kernelconcepts.de Git - karo-tx-linux.git/commitdiff
88pm860x_battery and charger: Fix a few post-merge issues
authorAnton Vorontsov <anton.vorontsov@linaro.org>
Thu, 23 Aug 2012 03:31:33 +0000 (20:31 -0700)
committerAnton Vorontsov <anton.vorontsov@linaro.org>
Thu, 20 Sep 2012 22:33:12 +0000 (15:33 -0700)
Sparse complains:

  CHECK   drivers/power/88pm860x_battery.c
drivers/power/88pm860x_battery.c:128:5: warning: symbol 'array_soc' was not declared. Should it be static?
  CHECK   drivers/power/88pm860x_charger.c
drivers/power/88pm860x_charger.c:640:3: warning: symbol 'pm860x_irq_descs' was not declared. Should it be static?
  CHECK   drivers/mfd/88pm860x-core.c
drivers/mfd/88pm860x-core.c:803:53: warning: incorrect type in assignment (different base types)
drivers/mfd/88pm860x-core.c:803:53:    expected struct charger_regulator *charger_regulators
drivers/mfd/88pm860x-core.c:803:53:    got struct regulator_bulk_data static [toplevel] *

The issues are minor, except for the last one. We seemed to use
'regulator_bulk_data' struct (just as charger manager documentation
wrongly tells us), but in real it should have been
'struct charger_regulator'. The only reason that it worked is
because both 'supply' and 'regulator_name' struct members are the
first in these structs. :-)

Signed-off-by: Anton Vorontsov <anton.vorontsov@linaro.org>
drivers/mfd/88pm860x-core.c
drivers/power/88pm860x_battery.c
drivers/power/88pm860x_charger.c

index 229cb2920089af16eec3aeca2e6294bcb753cd6a..76b5b7daf65df853e3908072455cd440fe2943ba 100644 (file)
@@ -157,8 +157,8 @@ static struct regulator_init_data preg_init_data = {
        .consumer_supplies      = &preg_supply[0],
 };
 
-static struct regulator_bulk_data chg_desc_regulator_data[] = {
-       { .supply = "preg", },
+static struct charger_regulator chg_desc_regulator_data[] = {
+       { .regulator_name = "preg", },
 };
 
 static struct mfd_cell power_devs[] = {
index 5e905f3db4bf7c8e830db05e4ddf02c6bcc6b4ea..beed5ecf75e12a4f5c534bc16a63a28ca41557a2 100644 (file)
@@ -125,7 +125,7 @@ struct ccnt {
  * State of Charge.
  * The first number is mAh(=3.6C), and the second number is percent point.
  */
-int array_soc[][2] = {
+static int array_soc[][2] = {
        {4170, 100}, {4154, 99}, {4136, 98}, {4122, 97}, {4107, 96},
        {4102, 95}, {4088, 94}, {4081, 93}, {4070, 92}, {4060, 91},
        {4053, 90}, {4044, 89}, {4035, 88}, {4028, 87}, {4019, 86},
index 4fd7614ee8399750aa18b713e10e46e28e47c45a..2dbeb1460901e8de01520ea1aba72df8d4f50988 100644 (file)
@@ -632,7 +632,7 @@ static int pm860x_init_charger(struct pm860x_charger_info *info)
        return 0;
 }
 
-struct pm860x_irq_desc {
+static struct pm860x_irq_desc {
        const char *name;
        irqreturn_t (*handler)(int irq, void *data);
 } pm860x_irq_descs[] = {