iio: ad5755: fix spelling mistake "to" -> "too" and grammar plus formatting

There is a spelling mistake and grammar mistake in a dev_err
message. Fix it.

Also include Joe Perches' additional suggestions around:
* Missing newlines
* Excess braces
* Odd indentation
* Some grammar

Signed-off-by: Colin Ian King <colin.king@canonical.com>
Reviewed-by: Alexandru Ardelean <alexandru.ardelean@analog.com>
Suggested-by: Joe Perches <joe@perches.com> # Additional cleanups etc.
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
This commit is contained in:
Colin Ian King 2020-01-23 09:19:54 +00:00 committed by Jonathan Cameron
parent 97d642e230
commit ebf7a11267

View File

@ -631,10 +631,9 @@ static struct ad5755_platform_data *ad5755_parse_dt(struct device *dev)
} }
} }
if (i == ARRAY_SIZE(ad5755_dcdc_freq_table)) { if (i == ARRAY_SIZE(ad5755_dcdc_freq_table))
dev_err(dev, dev_err(dev,
"adi,dc-dc-freq out of range selecting 410kHz"); "adi,dc-dc-freq out of range selecting 410kHz\n");
}
} }
pdata->dc_dc_maxv = AD5755_DC_DC_MAXV_23V; pdata->dc_dc_maxv = AD5755_DC_DC_MAXV_23V;
@ -645,17 +644,16 @@ static struct ad5755_platform_data *ad5755_parse_dt(struct device *dev)
break; break;
} }
} }
if (i == ARRAY_SIZE(ad5755_dcdc_maxv_table)) { if (i == ARRAY_SIZE(ad5755_dcdc_maxv_table))
dev_err(dev, dev_err(dev,
"adi,dc-dc-maxv out of range selecting 23V"); "adi,dc-dc-maxv out of range selecting 23V\n");
}
} }
devnr = 0; devnr = 0;
for_each_child_of_node(np, pp) { for_each_child_of_node(np, pp) {
if (devnr >= AD5755_NUM_CHANNELS) { if (devnr >= AD5755_NUM_CHANNELS) {
dev_err(dev, dev_err(dev,
"There is to many channels defined in DT\n"); "There are too many channels defined in DT\n");
goto error_out; goto error_out;
} }
@ -681,11 +679,10 @@ static struct ad5755_platform_data *ad5755_parse_dt(struct device *dev)
break; break;
} }
} }
if (i == ARRAY_SIZE(ad5755_slew_rate_table)) { if (i == ARRAY_SIZE(ad5755_slew_rate_table))
dev_err(dev, dev_err(dev,
"channel %d slew rate out of range selecting 64kHz", "channel %d slew rate out of range selecting 64kHz\n",
devnr); devnr);
}
pdata->dac[devnr].slew.step_size = AD5755_SLEW_STEP_SIZE_1; pdata->dac[devnr].slew.step_size = AD5755_SLEW_STEP_SIZE_1;
for (i = 0; i < ARRAY_SIZE(ad5755_slew_step_table); i++) { for (i = 0; i < ARRAY_SIZE(ad5755_slew_step_table); i++) {
@ -695,11 +692,10 @@ static struct ad5755_platform_data *ad5755_parse_dt(struct device *dev)
break; break;
} }
} }
if (i == ARRAY_SIZE(ad5755_slew_step_table)) { if (i == ARRAY_SIZE(ad5755_slew_step_table))
dev_err(dev, dev_err(dev,
"channel %d slew step size out of range selecting 1 LSB", "channel %d slew step size out of range selecting 1 LSB\n",
devnr); devnr);
}
} else { } else {
pdata->dac[devnr].slew.enable = false; pdata->dac[devnr].slew.enable = false;
pdata->dac[devnr].slew.rate = AD5755_SLEW_RATE_64k; pdata->dac[devnr].slew.rate = AD5755_SLEW_RATE_64k;