2
0
mirror of https://github.com/edk2-porting/linux-next.git synced 2024-11-30 05:25:20 +08:00

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 <jg1.han@samsung.com>
Signed-off-by: Anton Vorontsov <anton@enomsg.org>
This commit is contained in:
Jingoo Han 2013-05-23 19:34:39 +09:00 committed by Anton Vorontsov
parent c509a62c94
commit e083587924
2 changed files with 3 additions and 3 deletions

View File

@ -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);

View File

@ -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);