Commit 74f582ec authored by Lars-Peter Clausen's avatar Lars-Peter Clausen Committed by Jonathan Cameron
Browse files

iio: Replace strtobool() with kstrtobool()



strtobool() is deprecated and just a wrapper around kstrtobool().Replace
it with kstrtobool() so the deprecated function can be removed eventually.

Suggested-by: default avatarAndy Shevchenko <andy.shevchenko@gmail.com>
Signed-off-by: default avatarLars-Peter Clausen <lars@metafoo.de>
Reviewed-by: default avatarAndy Shevchenko <andy.shevchenko@gmail.com>
Link: https://lore.kernel.org/r/20220409105812.2113895-1-lars@metafoo.de


Signed-off-by: default avatarJonathan Cameron <Jonathan.Cameron@huawei.com>
parent ac3e62f5
Loading
Loading
Loading
Loading
+2 −2
Original line number Diff line number Diff line
@@ -226,7 +226,7 @@ static ssize_t ad7192_write_syscalib(struct iio_dev *indio_dev,
	bool sys_calib;
	int ret, temp;

	ret = strtobool(buf, &sys_calib);
	ret = kstrtobool(buf, &sys_calib);
	if (ret)
		return ret;

@@ -497,7 +497,7 @@ static ssize_t ad7192_set(struct device *dev,
	int ret;
	bool val;

	ret = strtobool(buf, &val);
	ret = kstrtobool(buf, &val);
	if (ret < 0)
		return ret;

+1 −1
Original line number Diff line number Diff line
@@ -488,7 +488,7 @@ static ssize_t ad7280_store_balance_sw(struct iio_dev *indio_dev,
	bool readin;
	int ret;

	ret = strtobool(buf, &readin);
	ret = kstrtobool(buf, &readin);
	if (ret)
		return ret;

+1 −1
Original line number Diff line number Diff line
@@ -550,7 +550,7 @@ static ssize_t ina2xx_allow_async_readout_store(struct device *dev,
	bool val;
	int ret;

	ret = strtobool(buf, &val);
	ret = kstrtobool(buf, &val);
	if (ret)
		return ret;

+1 −1
Original line number Diff line number Diff line
@@ -412,7 +412,7 @@ static ssize_t cros_ec_sensors_calibrate(struct iio_dev *indio_dev,
	int ret, i;
	bool calibrate;

	ret = strtobool(buf, &calibrate);
	ret = kstrtobool(buf, &calibrate);
	if (ret < 0)
		return ret;
	if (!calibrate)
+1 −1
Original line number Diff line number Diff line
@@ -288,7 +288,7 @@ static ssize_t ad5064_write_dac_powerdown(struct iio_dev *indio_dev,
	bool pwr_down;
	int ret;

	ret = strtobool(buf, &pwr_down);
	ret = kstrtobool(buf, &pwr_down);
	if (ret)
		return ret;

Loading