Commit 661d10ee authored by Linus Walleij's avatar Linus Walleij Committed by Sebastian Reichel

power: supply: ab8500: Rename charging algorithm psy

If we rename the "abx500_chargalg" supply to "ab8500_chargalg"
as it should be named, the existing supplies are supplying that
supply but that was obviously not working since it had the
wrong name.

Now that the dependency kicks in we get a bunch
of NULL references from ab8500_chargalg_external_power_changed()
so check that the workqueue is allocated before we try to
queue work on it.
Signed-off-by: default avatarLinus Walleij <linus.walleij@linaro.org>
Signed-off-by: default avatarSebastian Reichel <sebastian.reichel@collabora.com>
parent 484a9cc3
...@@ -1275,7 +1275,8 @@ static void ab8500_chargalg_external_power_changed(struct power_supply *psy) ...@@ -1275,7 +1275,8 @@ static void ab8500_chargalg_external_power_changed(struct power_supply *psy)
* Trigger execution of the algorithm instantly and read * Trigger execution of the algorithm instantly and read
* all power_supply properties there instead * all power_supply properties there instead
*/ */
queue_work(di->chargalg_wq, &di->chargalg_work); if (di->chargalg_wq)
queue_work(di->chargalg_wq, &di->chargalg_work);
} }
/** /**
...@@ -1949,7 +1950,7 @@ static char *supply_interface[] = { ...@@ -1949,7 +1950,7 @@ static char *supply_interface[] = {
}; };
static const struct power_supply_desc ab8500_chargalg_desc = { static const struct power_supply_desc ab8500_chargalg_desc = {
.name = "abx500_chargalg", .name = "ab8500_chargalg",
.type = POWER_SUPPLY_TYPE_BATTERY, .type = POWER_SUPPLY_TYPE_BATTERY,
.properties = ab8500_chargalg_props, .properties = ab8500_chargalg_props,
.num_properties = ARRAY_SIZE(ab8500_chargalg_props), .num_properties = ARRAY_SIZE(ab8500_chargalg_props),
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment