Skip to content

Commit

Permalink
hwmon: (powr1220) Cosmetic changes
Browse files Browse the repository at this point in the history
Update code alignments.

Signed-off-by: Michael Shych <michaelsh@nvidia.com>
Link: https://lore.kernel.org/r/20220118075611.10665-2-michaelsh@nvidia.com
Signed-off-by: Guenter Roeck <linux@roeck-us.net>
  • Loading branch information
mshych authored and groeck committed Feb 28, 2022
1 parent f86380b commit 15b1c18
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions drivers/hwmon/powr1220.c
Original file line number Diff line number Diff line change
Expand Up @@ -111,20 +111,20 @@ static int powr1220_read_adc(struct device *dev, int ch_num)
mutex_lock(&data->update_lock);

if (time_after(jiffies, data->adc_last_updated[ch_num] + HZ) ||
!data->adc_valid[ch_num]) {
!data->adc_valid[ch_num]) {
/*
* figure out if we need to use the attenuator for
* high inputs or inputs that we don't yet have a measurement
* for. We dynamically set the attenuator depending on the
* max reading.
*/
if (data->adc_maxes[ch_num] > ADC_MAX_LOW_MEASUREMENT_MV ||
data->adc_maxes[ch_num] == 0)
data->adc_maxes[ch_num] == 0)
adc_range = 1 << 4;

/* set the attenuator and mux */
result = i2c_smbus_write_byte_data(data->client, ADC_MUX,
adc_range | ch_num);
adc_range | ch_num);
if (result)
goto exit;

Expand Down

0 comments on commit 15b1c18

Please sign in to comment.