Skip to content

Commit

Permalink
lp8727_charger: Small cleanup in naming
Browse files Browse the repository at this point in the history
"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>
  • Loading branch information
Dan Carpenter authored and Anton Vorontsov committed Feb 3, 2013
1 parent 58a1c15 commit f96b307
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions drivers/power/lp8727_charger.c
Original file line number Diff line number Diff line change
Expand Up @@ -367,28 +367,28 @@ static int lp8727_battery_get_property(struct power_supply *psy,
return -EINVAL;

if (pdata->get_batt_present)
val->intval = pchg->pdata->get_batt_present();
val->intval = pdata->get_batt_present();
break;
case POWER_SUPPLY_PROP_VOLTAGE_NOW:
if (!pdata)
return -EINVAL;

if (pdata->get_batt_level)
val->intval = pchg->pdata->get_batt_level();
val->intval = pdata->get_batt_level();
break;
case POWER_SUPPLY_PROP_CAPACITY:
if (!pdata)
return -EINVAL;

if (pdata->get_batt_capacity)
val->intval = pchg->pdata->get_batt_capacity();
val->intval = pdata->get_batt_capacity();
break;
case POWER_SUPPLY_PROP_TEMP:
if (!pdata)
return -EINVAL;

if (pdata->get_batt_temp)
val->intval = pchg->pdata->get_batt_temp();
val->intval = pdata->get_batt_temp();
break;
default:
break;
Expand Down

0 comments on commit f96b307

Please sign in to comment.