msm: fix compiler errors/warnings in some drivers
fix compiler warnings/errors in some drivers. Change-Id: Ibc47729b5c5b7c4277bd4666ec56fe8995548b88 Signed-off-by: Abhijeet Dharmapurikar <adharmap@codeaurora.org>
This commit is contained in:
parent
a6fceb4732
commit
4680135ddc
8 changed files with 14 additions and 13 deletions
|
@ -2341,6 +2341,7 @@ static int qpnp_flash_led_probe(struct platform_device *pdev)
|
|||
int rc, i = 0, j, num_leds = 0;
|
||||
u32 val;
|
||||
|
||||
root = NULL;
|
||||
node = pdev->dev.of_node;
|
||||
if (node == NULL) {
|
||||
dev_info(&pdev->dev, "No flash device defined\n");
|
||||
|
|
|
@ -1638,7 +1638,7 @@ static void qpnp_hap_worker(struct work_struct *work)
|
|||
struct qpnp_hap *hap = container_of(work, struct qpnp_hap,
|
||||
work);
|
||||
u8 val = 0x00;
|
||||
int rc, reg_en;
|
||||
int rc, reg_en = 0;
|
||||
|
||||
if (hap->vcc_pon) {
|
||||
reg_en = regulator_enable(hap->vcc_pon);
|
||||
|
|
|
@ -149,7 +149,8 @@ int get_effective_client_id_locked(struct votable *votable)
|
|||
|
||||
int vote(struct votable *votable, int client_id, bool state, int val)
|
||||
{
|
||||
int effective_id, effective_result;
|
||||
int effective_id = - EINVAL;
|
||||
int effective_result;
|
||||
int rc = 0;
|
||||
|
||||
lock_votable(votable);
|
||||
|
|
|
@ -2503,9 +2503,7 @@ static int estimate_battery_age(struct fg_chip *chip, int *actual_capacity)
|
|||
}
|
||||
|
||||
battery_soc = get_battery_soc_raw(chip) * 100 / FULL_PERCENT_3B;
|
||||
if (rc) {
|
||||
goto error_done;
|
||||
} else if (battery_soc < 25 || battery_soc > 75) {
|
||||
if (battery_soc < 25 || battery_soc > 75) {
|
||||
if (fg_debug_mask & FG_AGING)
|
||||
pr_info("Battery SoC (%d) out of range, aborting\n",
|
||||
(int)battery_soc);
|
||||
|
@ -6115,7 +6113,6 @@ static int fg_hw_init(struct fg_chip *chip)
|
|||
static int fg_setup_memif_offset(struct fg_chip *chip)
|
||||
{
|
||||
int rc;
|
||||
u8 dig_major;
|
||||
|
||||
rc = fg_read(chip, chip->revision, chip->mem_base + DIG_MINOR, 4);
|
||||
if (rc) {
|
||||
|
@ -6133,7 +6130,8 @@ static int fg_setup_memif_offset(struct fg_chip *chip)
|
|||
chip->ima_supported = true;
|
||||
break;
|
||||
default:
|
||||
pr_err("Digital Major rev=%d not supported\n", dig_major);
|
||||
pr_err("Digital Major rev=%d not supported\n",
|
||||
chip->revision[DIG_MAJOR]);
|
||||
return -EINVAL;
|
||||
}
|
||||
|
||||
|
|
|
@ -491,7 +491,7 @@ module_param_named(
|
|||
if (smbchg_debug_mask & (reason)) \
|
||||
pr_info_ratelimited(fmt, ##__VA_ARGS__); \
|
||||
else \
|
||||
pr_debug_ratelimited(fmt, ##__VA_ARGS__); \
|
||||
pr_debug(fmt, ##__VA_ARGS__); \
|
||||
} while (0)
|
||||
|
||||
static int smbchg_read(struct smbchg_chip *chip, u8 *val,
|
||||
|
@ -4645,7 +4645,7 @@ static void handle_usb_insertion(struct smbchg_chip *chip)
|
|||
|
||||
if (parallel_psy) {
|
||||
pval.intval = true;
|
||||
power_supply_set_property(parallel_psy,
|
||||
rc = power_supply_set_property(parallel_psy,
|
||||
POWER_SUPPLY_PROP_PRESENT, &pval);
|
||||
chip->parallel_charger_detected = rc ? false : true;
|
||||
if (rc)
|
||||
|
@ -7860,6 +7860,7 @@ static int smbchg_probe(struct platform_device *pdev)
|
|||
}
|
||||
}
|
||||
|
||||
vadc_dev = NULL;
|
||||
if (of_find_property(pdev->dev.of_node, "qcom,dcin-vadc", NULL)) {
|
||||
vadc_dev = qpnp_get_vadc(&pdev->dev, "dcin");
|
||||
if (IS_ERR(vadc_dev)) {
|
||||
|
@ -7872,6 +7873,7 @@ static int smbchg_probe(struct platform_device *pdev)
|
|||
}
|
||||
}
|
||||
|
||||
vchg_vadc_dev = NULL;
|
||||
if (of_find_property(pdev->dev.of_node, "qcom,vchg_sns-vadc", NULL)) {
|
||||
vchg_vadc_dev = qpnp_get_vadc(&pdev->dev, "vchg_sns");
|
||||
if (IS_ERR(vchg_vadc_dev)) {
|
||||
|
|
|
@ -1773,7 +1773,7 @@ static void smb1351_chg_ctrl_in_jeita(struct smb1351_charger *chip)
|
|||
static void smb1351_chg_adc_notification(enum qpnp_tm_state state, void *ctx)
|
||||
{
|
||||
struct smb1351_charger *chip = ctx;
|
||||
struct battery_status *cur;
|
||||
struct battery_status *cur = NULL;
|
||||
int temp;
|
||||
|
||||
if (state >= ADC_TM_STATE_NUM) {
|
||||
|
@ -1828,7 +1828,6 @@ static void smb1351_chg_adc_notification(enum qpnp_tm_state state, void *ctx)
|
|||
chip->adc_param.high_temp = chip->batt_cold_decidegc;
|
||||
chip->adc_param.low_temp = chip->batt_missing_decidegc
|
||||
- HYSTERESIS_DECIDEGC;
|
||||
|
||||
}
|
||||
/* temp from high to low */
|
||||
} else {
|
||||
|
|
|
@ -4358,7 +4358,7 @@ static int smb135x_parallel_charger_probe(struct i2c_client *client,
|
|||
¶llel_psy_cfg);
|
||||
if (IS_ERR(chip->parallel_psy)) {
|
||||
dev_err(&client->dev,
|
||||
"Unable to register parallel_psy rc = %d\n",
|
||||
"Unable to register parallel_psy rc = %ld\n",
|
||||
PTR_ERR(chip->parallel_psy));
|
||||
return rc;
|
||||
}
|
||||
|
|
|
@ -42,7 +42,7 @@ static inline struct msm_apm_ctrl_dev *msm_apm_ctrl_dev_get(struct device *dev)
|
|||
static inline int msm_apm_set_supply(struct msm_apm_ctrl_dev *ctrl_dev,
|
||||
enum msm_apm_supply supply)
|
||||
{ return -EPERM; }
|
||||
static inline int msm_apm_get_supply(struct msm_apm_ctrl_dev *ctrl_dev);
|
||||
static inline int msm_apm_get_supply(struct msm_apm_ctrl_dev *ctrl_dev)
|
||||
{ return -EPERM; }
|
||||
#endif
|
||||
#endif
|
||||
|
|
Loading…
Add table
Reference in a new issue