battery_v2: silence enum-conversion warnings
authorMichael Benedict <michaelbt@live.com>
Mon, 3 Jun 2019 08:21:08 +0000 (18:21 +1000)
committerivanmeler <i_ivan@windowslive.com>
Wed, 13 Apr 2022 21:13:35 +0000 (21:13 +0000)
Signed-off-by: Michael Benedict <michaelbt@live.com>
drivers/battery_v2/include/sec_charging_common.h
drivers/battery_v2/max77865_charger.c
drivers/battery_v2/mfc_charger.c
drivers/battery_v2/sec_battery.c

index 172c0985afa9e367aa5bb798732faea2a4dff3e0..ec9ce8b5f89dcc53544ef9f64e8e2bff896e5082 100755 (executable)
@@ -1031,7 +1031,8 @@ static inline struct power_supply *get_power_supply_by_name(char *name)
                ret = -ENOENT;  \
        } else {        \
                if (psy->desc->function##_property != NULL) { \
-                       ret = psy->desc->function##_property(psy, (property), &(value)); \
+                       ret = psy->desc->function##_property(psy, \
+                               (enum power_supply_property) (property), &(value)); \
                        if (ret < 0) {  \
                                pr_err("%s: Fail to %s "#function" (%d=>%d)\n", \
                                                __func__, name, (property), ret);       \
index da10d164ce936a2316c97b27fdac5ca9de2bbf3c..a6ae1d4b3f773cac107b185435a24714eb79b706 100755 (executable)
@@ -895,7 +895,7 @@ static int max77865_chg_get_property(struct power_supply *psy,
 {
        struct max77865_charger_data *charger = power_supply_get_drvdata(psy);
        u8 reg_data;
-       enum power_supply_ext_property ext_psp = psp;
+       enum power_supply_ext_property ext_psp = (enum power_supply_ext_property)psp;
 
        switch (psp) {
        case POWER_SUPPLY_PROP_ONLINE:
@@ -1031,7 +1031,7 @@ static int max77865_chg_set_property(struct power_supply *psy,
        u8 reg = 0;
        static u8 chg_int_state;
        int buck_state = ENABLE;
-       enum power_supply_ext_property ext_psp = psp;
+       enum power_supply_ext_property ext_psp = (enum power_supply_ext_property)psp;
 
        switch (psp) {
        /* val->intval : type */
index 8cb8135c8003f343a7b260b357f965305c8fd8fe..a69a52ec90e953fe45870ab7428e148c696b8fc8 100755 (executable)
@@ -1774,7 +1774,7 @@ static int mfc_chg_get_property(struct power_supply *psy,
                union power_supply_propval *val)
 {
        struct mfc_charger_data *charger = power_supply_get_drvdata(psy);
-       enum power_supply_ext_property ext_psp = psp;
+       enum power_supply_ext_property ext_psp = (enum power_supply_ext_property) psp;
 //     union power_supply_propval value;
        u8 mst_mode;
        u8 reg_data;
index a67256024b425deaff772892d78af322e52c8315..65bab09c2fa9664ca424e37b4dabe0f659882e53 100755 (executable)
@@ -6241,7 +6241,7 @@ static int sec_bat_set_property(struct power_supply *psy,
        int current_cable_type = SEC_BATTERY_CABLE_NONE;
        int full_check_type = SEC_BATTERY_FULLCHARGED_NONE;
        union power_supply_propval value = {0, };
-       enum power_supply_ext_property ext_psp = psp;
+       enum power_supply_ext_property ext_psp = (enum power_supply_ext_property) psp;
 
        dev_dbg(battery->dev,
                "%s: (%d,%d)\n", __func__, psp, val->intval);
@@ -6491,7 +6491,7 @@ static int sec_bat_get_property(struct power_supply *psy,
 {
        struct sec_battery_info *battery = power_supply_get_drvdata(psy);
        union power_supply_propval value = {0, };
-       enum power_supply_ext_property ext_psp = psp;
+       enum power_supply_ext_property ext_psp = (enum power_supply_ext_property) psp;
 
        switch (psp) {
        case POWER_SUPPLY_PROP_STATUS:
@@ -6738,7 +6738,7 @@ static int sec_ac_get_property(struct power_supply *psy,
                               union power_supply_propval *val)
 {
        struct sec_battery_info *battery = power_supply_get_drvdata(psy);
-       enum power_supply_ext_property ext_psp = psp;
+       enum power_supply_ext_property ext_psp = (enum power_supply_ext_property) psp;
 
        switch (psp) {
        case POWER_SUPPLY_PROP_ONLINE: