power_supply: ab8500: Use power_supply_*() API for accessing function attrs
[firefly-linux-kernel-4.4.55.git] / drivers / power / abx500_chargalg.c
index 0da4415cbc10a9108c67680c6d075a06e6764759..ac6f4a22f8464feb4a6e07f2a7e91caa4f4c87f9 100644 (file)
@@ -1001,7 +1001,7 @@ static int abx500_chargalg_get_ext_psy_data(struct device *dev, void *data)
         * property because of handling that sysfs entry on its own, this is
         * the place to get the battery capacity.
         */
-       if (!ext->get_property(ext, POWER_SUPPLY_PROP_CAPACITY, &ret)) {
+       if (!power_supply_get_property(ext, POWER_SUPPLY_PROP_CAPACITY, &ret)) {
                di->batt_data.percent = ret.intval;
                capacity_updated = true;
        }
@@ -1019,7 +1019,7 @@ static int abx500_chargalg_get_ext_psy_data(struct device *dev, void *data)
                        ext->type == POWER_SUPPLY_TYPE_USB)
                        di->usb_chg = psy_to_ux500_charger(ext);
 
-               if (ext->get_property(ext, prop, &ret))
+               if (power_supply_get_property(ext, prop, &ret))
                        continue;
                switch (prop) {
                case POWER_SUPPLY_PROP_PRESENT: