summaryrefslogtreecommitdiff
path: root/drivers/power/tps65217_charger.c
diff options
context:
space:
mode:
authorGreg Kroah-Hartman <gregkh@linuxfoundation.org>2016-07-04 08:19:21 -0700
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2016-07-04 08:19:21 -0700
commitc318a821b9828ef3be97d5d896d146e7daa43c86 (patch)
tree7ed40911ffebcbabf87ec4be692f6fb154053687 /drivers/power/tps65217_charger.c
parent322832f2f19e04c866a0ce4bdac8cff8e695f2b3 (diff)
parenta99cde438de0c4c0cecc1d1af1a55a75b10bfdef (diff)
Merge 4.7-rc6 into usb-next
We want the USB fixes in here as well. Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/power/tps65217_charger.c')
-rw-r--r--drivers/power/tps65217_charger.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/drivers/power/tps65217_charger.c b/drivers/power/tps65217_charger.c
index d9f56730c735..73dfae41def8 100644
--- a/drivers/power/tps65217_charger.c
+++ b/drivers/power/tps65217_charger.c
@@ -197,6 +197,7 @@ static int tps65217_charger_probe(struct platform_device *pdev)
{
struct tps65217 *tps = dev_get_drvdata(pdev->dev.parent);
struct tps65217_charger *charger;
+ struct power_supply_config cfg = {};
int ret;
dev_dbg(&pdev->dev, "%s\n", __func__);
@@ -208,9 +209,12 @@ static int tps65217_charger_probe(struct platform_device *pdev)
charger->tps = tps;
charger->dev = &pdev->dev;
+ cfg.of_node = pdev->dev.of_node;
+ cfg.drv_data = charger;
+
charger->ac = devm_power_supply_register(&pdev->dev,
&tps65217_charger_desc,
- NULL);
+ &cfg);
if (IS_ERR(charger->ac)) {
dev_err(&pdev->dev, "failed: power supply register\n");
return PTR_ERR(charger->ac);