Loading drivers/power/supply/qcom/smb5-lib.c +4 −4 Original line number Diff line number Diff line // SPDX-License-Identifier: GPL-2.0-only /* * Copyright (c) 2018-2019 The Linux Foundation. All rights reserved. * Copyright (c) 2018-2020 The Linux Foundation. All rights reserved. */ #include <linux/device.h> Loading Loading @@ -3359,13 +3359,13 @@ int smblib_get_prop_usb_voltage_now(struct smb_charger *chg, { union power_supply_propval pval = {0, }; int rc, ret = 0; u8 reg; u8 reg, adc_ch_reg; mutex_lock(&chg->adc_lock); if (chg->wa_flags & USBIN_ADC_WA) { /* Store ADC channel config in order to restore later */ rc = smblib_read(chg, BATIF_ADC_CHANNEL_EN_REG, ®); rc = smblib_read(chg, BATIF_ADC_CHANNEL_EN_REG, &adc_ch_reg); if (rc < 0) { smblib_err(chg, "Couldn't read ADC config rc=%d\n", rc); ret = rc; Loading Loading @@ -3422,7 +3422,7 @@ int smblib_get_prop_usb_voltage_now(struct smb_charger *chg, restore_adc_config: /* Restore ADC channel config */ if (chg->wa_flags & USBIN_ADC_WA) { rc = smblib_write(chg, BATIF_ADC_CHANNEL_EN_REG, reg); rc = smblib_write(chg, BATIF_ADC_CHANNEL_EN_REG, adc_ch_reg); if (rc < 0) smblib_err(chg, "Couldn't write ADC config rc=%d\n", rc); Loading Loading
drivers/power/supply/qcom/smb5-lib.c +4 −4 Original line number Diff line number Diff line // SPDX-License-Identifier: GPL-2.0-only /* * Copyright (c) 2018-2019 The Linux Foundation. All rights reserved. * Copyright (c) 2018-2020 The Linux Foundation. All rights reserved. */ #include <linux/device.h> Loading Loading @@ -3359,13 +3359,13 @@ int smblib_get_prop_usb_voltage_now(struct smb_charger *chg, { union power_supply_propval pval = {0, }; int rc, ret = 0; u8 reg; u8 reg, adc_ch_reg; mutex_lock(&chg->adc_lock); if (chg->wa_flags & USBIN_ADC_WA) { /* Store ADC channel config in order to restore later */ rc = smblib_read(chg, BATIF_ADC_CHANNEL_EN_REG, ®); rc = smblib_read(chg, BATIF_ADC_CHANNEL_EN_REG, &adc_ch_reg); if (rc < 0) { smblib_err(chg, "Couldn't read ADC config rc=%d\n", rc); ret = rc; Loading Loading @@ -3422,7 +3422,7 @@ int smblib_get_prop_usb_voltage_now(struct smb_charger *chg, restore_adc_config: /* Restore ADC channel config */ if (chg->wa_flags & USBIN_ADC_WA) { rc = smblib_write(chg, BATIF_ADC_CHANNEL_EN_REG, reg); rc = smblib_write(chg, BATIF_ADC_CHANNEL_EN_REG, adc_ch_reg); if (rc < 0) smblib_err(chg, "Couldn't write ADC config rc=%d\n", rc); Loading