Skip to contentSkip to conversation

lp8727_charger: small cleanup in naming

PATCH Applied Dan Carpenter 3 participants 3 messages Jan 25, 2013 – Feb 3, 2013 Kernel janitors

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 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.

drivers/power/lp8727_charger.c +4 -4
index 4ee71a9..5ef41b8 100644
@@ -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;
Acked-by on v1 1/1
#1 lore raw
Quoted 3 lines

"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.

Thanks!