aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/power
diff options
context:
space:
mode:
authorDan Carpenter <dan.carpenter@oracle.com>2013-01-25 10:43:50 -0500
committerAnton Vorontsov <anton@enomsg.org>2013-02-02 22:33:52 -0500
commitf96b3074ecfedf74b137dc2cc00dccbf479d2713 (patch)
tree24ea5ed4cedf35c3969560036dd6774d0acfad4c /drivers/power
parent58a1c154d449aae97a8ecad67ddbfd4024ac8446 (diff)
lp8727_charger: Small cleanup in naming
"pdata" and "pchg->pdata" are the same. Changing the function call to pdata->get_batt_present() makes it match the check and it's a little cleaner. Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com> Acked-by: Milo Kim <milo.kim@ti.com> Signed-off-by: Anton Vorontsov <anton@enomsg.org>
Diffstat (limited to 'drivers/power')
-rw-r--r--drivers/power/lp8727_charger.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/drivers/power/lp8727_charger.c b/drivers/power/lp8727_charger.c
index 4ee71a90e248..5ef41b819172 100644
--- a/drivers/power/lp8727_charger.c
+++ b/drivers/power/lp8727_charger.c
@@ -367,28 +367,28 @@ static int lp8727_battery_get_property(struct power_supply *psy,
367 return -EINVAL; 367 return -EINVAL;
368 368
369 if (pdata->get_batt_present) 369 if (pdata->get_batt_present)
370 val->intval = pchg->pdata->get_batt_present(); 370 val->intval = pdata->get_batt_present();
371 break; 371 break;
372 case POWER_SUPPLY_PROP_VOLTAGE_NOW: 372 case POWER_SUPPLY_PROP_VOLTAGE_NOW:
373 if (!pdata) 373 if (!pdata)
374 return -EINVAL; 374 return -EINVAL;
375 375
376 if (pdata->get_batt_level) 376 if (pdata->get_batt_level)
377 val->intval = pchg->pdata->get_batt_level(); 377 val->intval = pdata->get_batt_level();
378 break; 378 break;
379 case POWER_SUPPLY_PROP_CAPACITY: 379 case POWER_SUPPLY_PROP_CAPACITY:
380 if (!pdata) 380 if (!pdata)
381 return -EINVAL; 381 return -EINVAL;
382 382
383 if (pdata->get_batt_capacity) 383 if (pdata->get_batt_capacity)
384 val->intval = pchg->pdata->get_batt_capacity(); 384 val->intval = pdata->get_batt_capacity();
385 break; 385 break;
386 case POWER_SUPPLY_PROP_TEMP: 386 case POWER_SUPPLY_PROP_TEMP:
387 if (!pdata) 387 if (!pdata)
388 return -EINVAL; 388 return -EINVAL;
389 389
390 if (pdata->get_batt_temp) 390 if (pdata->get_batt_temp)
391 val->intval = pchg->pdata->get_batt_temp(); 391 val->intval = pdata->get_batt_temp();
392 break; 392 break;
393 default: 393 default:
394 break; 394 break;