unsigned long lval;
int div, ret;
- ret = strict_strtoul(buf, 10, &lval);
+ ret = kstrtoul(buf, 10, &lval);
if (ret)
return ret;
if (lval == 0)
long val;
int ret;
- ret = strict_strtol(buf, 10, &val);
+ ret = kstrtol(buf, 10, &val);
if (ret)
return ret;
struct iio_dev *indio_dev = dev_to_iio_dev(dev);
struct ad7606_state *st = iio_priv(indio_dev);
unsigned long lval;
+ int ret;
+
+ ret = kstrtoul(buf, 10, &lval);
+ if (ret)
+ return ret;
- if (strict_strtoul(buf, 10, &lval))
- return -EINVAL;
if (!(lval == 5000 || lval == 10000)) {
dev_err(dev, "range is not supported\n");
return -EINVAL;
unsigned long lval;
int ret;
- if (strict_strtoul(buf, 10, &lval))
- return -EINVAL;
+ ret = kstrtoul(buf, 10, &lval);
+ if (ret)
+ return ret;
ret = ad7606_oversampling_get_index(lval);
if (ret < 0) {
unsigned long data;
int ret;
- ret = strict_strtoul(buf, 10, &data);
+ ret = kstrtoul(buf, 10, &data);
if (ret)
- return -EINVAL;
+ return ret;
if (data > AD7816_CS_MAX && data != AD7816_CS_MASK) {
dev_err(&chip->spi_dev->dev, "Invalid channel id %lu for %s.\n",
u8 data;
int ret;
- ret = strict_strtol(buf, 10, &value);
+ ret = kstrtol(buf, 10, &value);
+ if (ret)
+ return ret;
if (chip->channel_id > AD7816_CS_MAX) {
dev_err(dev, "Invalid oti channel id %d.\n", chip->channel_id);
int ret, i;
u8 t;
- ret = strict_strtol(buf, 10, &val);
+ ret = kstrtol(buf, 10, &val);
if (ret)
return ret;
long val;
int ret;
- ret = strict_strtol(buf, 10, &val);
+ ret = kstrtol(buf, 10, &val);
if (ret)
return ret;