pmaports/main/linux-postmarketos-exynos4/0003-power-supply-max8997-charger-Fix-platform-data-retri.patch
Timon Baetz 1d562fc44b
linux-postmarketos-exynos4: add kernel patches to fix charging (MR 1766)
Also update to latest stable kernel and remove patch that got
integrated upstream.

[ci:skip-build] Already built on CI
2021-02-16 00:03:30 +03:00

29 lines
1.1 KiB
Diff

From 5976a8d0bd4796ef6a0cb1f567a0d82967c62408 Mon Sep 17 00:00:00 2001
From: Timon Baetz <timon.baetz@protonmail.com>
Date: Mon, 9 Nov 2020 19:43:28 +0000
Subject: [PATCH] power: supply: max8997-charger: Fix platform data retrieval
Use pdata field of max8998_dev struct to obtain platform data.
Signed-off-by: Timon Baetz <timon.baetz@protonmail.com>
Signed-off-by: Sebastian Reichel <sebastian.reichel@collabora.com>
---
drivers/power/supply/max8997_charger.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/power/supply/max8997_charger.c b/drivers/power/supply/max8997_charger.c
index 94d1ade047a7..8fccd58dac67 100644
--- a/drivers/power/supply/max8997_charger.c
+++ b/drivers/power/supply/max8997_charger.c
@@ -84,7 +84,7 @@ static int max8997_battery_probe(struct platform_device *pdev)
int ret = 0;
struct charger_data *charger;
struct max8997_dev *iodev = dev_get_drvdata(pdev->dev.parent);
- struct max8997_platform_data *pdata = dev_get_platdata(iodev->dev);
+ struct max8997_platform_data *pdata = iodev->pdata;
struct power_supply_config psy_cfg = {};
if (!pdata)
--
2.25.1