From e08358792422ef0b78d7c81f333fc0803fb41cd4 Mon Sep 17 00:00:00 2001 From: Jingoo Han Date: Thu, 23 May 2013 19:34:39 +0900 Subject: power: Use platform_{get,set}_drvdata() Use the wrapper functions for getting and setting the driver data using platform_device instead of using dev_{get,set}_drvdata() with &pdev->dev, so we can directly pass a struct platform_device. Signed-off-by: Jingoo Han Signed-off-by: Anton Vorontsov --- drivers/power/intel_mid_battery.c | 2 +- drivers/power/tps65090-charger.c | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) (limited to 'drivers/power') diff --git a/drivers/power/intel_mid_battery.c b/drivers/power/intel_mid_battery.c index 18d136b443e..4520811168a 100644 --- a/drivers/power/intel_mid_battery.c +++ b/drivers/power/intel_mid_battery.c @@ -756,7 +756,7 @@ static int platform_pmic_battery_probe(struct platform_device *pdev) static int platform_pmic_battery_remove(struct platform_device *pdev) { - struct pmic_power_module_info *pbi = dev_get_drvdata(&pdev->dev); + struct pmic_power_module_info *pbi = platform_get_drvdata(pdev); free_irq(pbi->irq, pbi); cancel_delayed_work_sync(&pbi->monitor_battery); diff --git a/drivers/power/tps65090-charger.c b/drivers/power/tps65090-charger.c index 9fbca310a2a..77ab8561fa3 100644 --- a/drivers/power/tps65090-charger.c +++ b/drivers/power/tps65090-charger.c @@ -218,7 +218,7 @@ static int tps65090_charger_probe(struct platform_device *pdev) return -ENOMEM; } - dev_set_drvdata(&pdev->dev, cdata); + platform_set_drvdata(pdev, cdata); cdata->dev = &pdev->dev; cdata->pdata = pdata; @@ -291,7 +291,7 @@ fail_unregister_supply: static int tps65090_charger_remove(struct platform_device *pdev) { - struct tps65090_charger *cdata = dev_get_drvdata(&pdev->dev); + struct tps65090_charger *cdata = platform_get_drvdata(pdev); devm_free_irq(cdata->dev, cdata->irq, cdata); power_supply_unregister(&cdata->ac); -- cgit v1.2.3-70-g09d2