Skip to content

Commit f1c74a6

Browse files
Linus Walleijsre
authored andcommitted
power: supply: ab8500: Fix an old bug
Trying to get the AB8500 charging driver working I ran into a bit of bitrot: we haven't used the driver for a while so errors in refactorings won't be noticed. This one is pretty self evident: use argument to the macro or we end up with a random pointer to something else. Cc: stable@vger.kernel.org Cc: Krzysztof Kozlowski <krzk@kernel.org> Cc: Marcus Cooper <codekipper@gmail.com> Fixes: 297d716 ("power_supply: Change ownership from driver to core") Signed-off-by: Linus Walleij <linus.walleij@linaro.org> Signed-off-by: Sebastian Reichel <sebastian.reichel@collabora.com>
1 parent f390e4b commit f1c74a6

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

drivers/power/supply/ab8500-chargalg.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@
1515
* - POWER_SUPPLY_TYPE_USB,
1616
* because only them store as drv_data pointer to struct ux500_charger.
1717
*/
18-
#define psy_to_ux500_charger(x) power_supply_get_drvdata(psy)
18+
#define psy_to_ux500_charger(x) power_supply_get_drvdata(x)
1919

2020
/* Forward declaration */
2121
struct ux500_charger;

0 commit comments

Comments
 (0)