Skip to content

Commit ae81c43

Browse files
leaveyoustunjic23
authored andcommitted
iio: temperature: ltc2983: Fix inconsistent channel wording in messages
Replace occurrences of the abbreviated 'chann' and 'chan' with 'channel' in error and debug messages throughout the driver. Also changed the diode invalid channel error message from "thermistor" to "diode". Reviewed-by: Joshua Crofts <joshua.crofts1@gmail.com> Signed-off-by: Liviu Stan <liviu.stan@analog.com> Signed-off-by: Jonathan Cameron <jic23@kernel.org>
1 parent 6b047d0 commit ae81c43

1 file changed

Lines changed: 15 additions & 15 deletions

File tree

drivers/iio/temperature/ltc2983.c

Lines changed: 15 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -699,7 +699,7 @@ ltc2983_thermocouple_new(const struct fwnode_handle *child, struct ltc2983_data
699699
if (!(thermo->sensor_config & LTC2983_THERMOCOUPLE_DIFF_MASK) &&
700700
sensor->chan < LTC2983_DIFFERENTIAL_CHAN_MIN)
701701
return dev_err_ptr_probe(dev, -EINVAL,
702-
"Invalid chann:%d for differential thermocouple\n",
702+
"Invalid channel %d for differential thermocouple\n",
703703
sensor->chan);
704704

705705
struct fwnode_handle *ref __free(fwnode_handle) =
@@ -797,7 +797,7 @@ ltc2983_rtd_new(const struct fwnode_handle *child, struct ltc2983_data *st,
797797
/*
798798
* rtd channel indexes are a bit more complicated to validate.
799799
* For 4wire RTD with rotation, the channel selection cannot be
800-
* >=19 since the chann + 1 is used in this configuration.
800+
* >=19 since the channel + 1 is used in this configuration.
801801
* For 4wire RTDs with kelvin rsense, the rsense channel cannot be
802802
* <=1 since channel - 1 and channel - 2 are used.
803803
*/
@@ -814,18 +814,18 @@ ltc2983_rtd_new(const struct fwnode_handle *child, struct ltc2983_data *st,
814814
(rtd->r_sense_chan <= min))
815815
/* kelvin rsense*/
816816
return dev_err_ptr_probe(dev, -EINVAL,
817-
"Invalid rsense chann:%d to use in kelvin rsense\n",
817+
"Invalid channel %d for kelvin rsense\n",
818818
rtd->r_sense_chan);
819819

820820
if (sensor->chan < min || sensor->chan > max)
821821
return dev_err_ptr_probe(dev, -EINVAL,
822-
"Invalid chann:%d for the rtd config\n",
822+
"Invalid channel %d for RTD config\n",
823823
sensor->chan);
824824
} else {
825825
/* same as differential case */
826826
if (sensor->chan < LTC2983_DIFFERENTIAL_CHAN_MIN)
827827
return dev_err_ptr_probe(dev, -EINVAL,
828-
"Invalid chann:%d for RTD\n",
828+
"Invalid channel %d for RTD\n",
829829
sensor->chan);
830830
}
831831

@@ -924,7 +924,7 @@ ltc2983_thermistor_new(const struct fwnode_handle *child, struct ltc2983_data *s
924924
if (!(thermistor->sensor_config & LTC2983_THERMISTOR_DIFF_MASK) &&
925925
sensor->chan < LTC2983_DIFFERENTIAL_CHAN_MIN)
926926
return dev_err_ptr_probe(dev, -EINVAL,
927-
"Invalid chann:%d for differential thermistor\n",
927+
"Invalid channel %d for differential thermistor\n",
928928
sensor->chan);
929929

930930
/* check custom sensor */
@@ -1039,7 +1039,7 @@ ltc2983_diode_new(const struct fwnode_handle *child, const struct ltc2983_data *
10391039
if (!(diode->sensor_config & LTC2983_DIODE_DIFF_MASK) &&
10401040
sensor->chan < LTC2983_DIFFERENTIAL_CHAN_MIN)
10411041
return dev_err_ptr_probe(dev, -EINVAL,
1042-
"Invalid chann:%d for differential thermistor\n",
1042+
"Invalid channel %d for differential diode\n",
10431043
sensor->chan);
10441044

10451045
/* set common parameters */
@@ -1093,7 +1093,7 @@ static struct ltc2983_sensor *ltc2983_r_sense_new(struct fwnode_handle *child,
10931093
/* validate channel index */
10941094
if (sensor->chan < LTC2983_DIFFERENTIAL_CHAN_MIN)
10951095
return dev_err_ptr_probe(dev, -EINVAL,
1096-
"Invalid chann:%d for r_sense\n",
1096+
"Invalid channel %d for r_sense\n",
10971097
sensor->chan);
10981098

10991099
ret = fwnode_property_read_u32(child, "adi,rsense-val-milli-ohms", &temp);
@@ -1130,7 +1130,7 @@ static struct ltc2983_sensor *ltc2983_adc_new(struct fwnode_handle *child,
11301130

11311131
if (!adc->single_ended && sensor->chan < LTC2983_DIFFERENTIAL_CHAN_MIN)
11321132
return dev_err_ptr_probe(dev, -EINVAL,
1133-
"Invalid chan:%d for differential adc\n",
1133+
"Invalid channel %d for differential ADC\n",
11341134
sensor->chan);
11351135

11361136
/* set common parameters */
@@ -1156,7 +1156,7 @@ static struct ltc2983_sensor *ltc2983_temp_new(struct fwnode_handle *child,
11561156

11571157
if (!temp->single_ended && sensor->chan < LTC2983_DIFFERENTIAL_CHAN_MIN)
11581158
return dev_err_ptr_probe(dev, -EINVAL,
1159-
"Invalid chan:%d for differential temp\n",
1159+
"Invalid channel %d for differential temp\n",
11601160
sensor->chan);
11611161

11621162
temp->custom = __ltc2983_custom_sensor_new(st, child, "adi,custom-temp",
@@ -1181,7 +1181,7 @@ static int ltc2983_chan_read(struct ltc2983_data *st,
11811181

11821182
start_conversion = LTC2983_STATUS_START(true);
11831183
start_conversion |= LTC2983_STATUS_CHAN_SEL(sensor->chan);
1184-
dev_dbg(dev, "Start conversion on chan:%d, status:%02X\n",
1184+
dev_dbg(dev, "Start conversion on channel:%d, status:%02X\n",
11851185
sensor->chan, start_conversion);
11861186
reinit_completion(&st->completion);
11871187
/* start conversion */
@@ -1232,7 +1232,7 @@ static int ltc2983_read_raw(struct iio_dev *indio_dev,
12321232

12331233
/* sanity check */
12341234
if (chan->address >= st->num_channels) {
1235-
dev_err(dev, "Invalid chan address:%ld", chan->address);
1235+
dev_err(dev, "Invalid channel address: %ld\n", chan->address);
12361236
return -EINVAL;
12371237
}
12381238

@@ -1329,22 +1329,22 @@ static int ltc2983_parse_fw(struct ltc2983_data *st)
13291329
if (sensor.chan < LTC2983_MIN_CHANNELS_NR ||
13301330
sensor.chan > st->info->max_channels_nr)
13311331
return dev_err_probe(dev, -EINVAL,
1332-
"chan:%d must be from %u to %u\n",
1332+
"channel:%d must be from %u to %u\n",
13331333
sensor.chan,
13341334
LTC2983_MIN_CHANNELS_NR,
13351335
st->info->max_channels_nr);
13361336

13371337
if (channel_avail_mask & BIT(sensor.chan))
13381338
return dev_err_probe(dev, -EINVAL,
1339-
"chan:%d already in use\n",
1339+
"channel:%d already in use\n",
13401340
sensor.chan);
13411341

13421342
ret = fwnode_property_read_u32(child, "adi,sensor-type", &sensor.type);
13431343
if (ret)
13441344
return dev_err_probe(dev, ret,
13451345
"adi,sensor-type property must given for child nodes\n");
13461346

1347-
dev_dbg(dev, "Create new sensor, type %u, chann %u",
1347+
dev_dbg(dev, "Create new sensor, type %u, channel %u",
13481348
sensor.type, sensor.chan);
13491349

13501350
if (sensor.type >= LTC2983_SENSOR_THERMOCOUPLE &&

0 commit comments

Comments
 (0)