diff options
author | Julien Stephan <jstephan@baylibre.com> | 2024-10-24 11:11:28 +0200 |
---|---|---|
committer | Jonathan Cameron <Jonathan.Cameron@huawei.com> | 2024-11-01 14:54:45 +0000 |
commit | 7804363d596a8f9e0f0643155b796b5cd629eea2 (patch) | |
tree | 2bb1517a22e14f5c894804638a26b7724a64c44d /drivers | |
parent | 71490e9ef5a902407866df63e1f8c224e1d9d1db (diff) | |
download | linux-stable-7804363d596a8f9e0f0643155b796b5cd629eea2.tar.gz linux-stable-7804363d596a8f9e0f0643155b796b5cd629eea2.tar.bz2 linux-stable-7804363d596a8f9e0f0643155b796b5cd629eea2.zip |
iio: light: stk3310: simplify code in write_event_config callback
iio_ev_state_store is actually using kstrtobool to check user
input, then gives the converted boolean value to the write_event_config
callback.
Remove useless code in write_event_config callback.
Signed-off-by: Julien Stephan <jstephan@baylibre.com>
Link: https://patch.msgid.link/20241024-iio-fix-write-event-config-signature-v1-6-7d29e5a31b00@baylibre.com
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/iio/light/stk3310.c | 3 |
1 files changed, 0 insertions, 3 deletions
diff --git a/drivers/iio/light/stk3310.c b/drivers/iio/light/stk3310.c index ed20b6714546..c6f950af5afa 100644 --- a/drivers/iio/light/stk3310.c +++ b/drivers/iio/light/stk3310.c @@ -330,9 +330,6 @@ static int stk3310_write_event_config(struct iio_dev *indio_dev, struct stk3310_data *data = iio_priv(indio_dev); struct i2c_client *client = data->client; - if (state < 0 || state > 7) - return -EINVAL; - /* Set INT_PS value */ mutex_lock(&data->lock); ret = regmap_field_write(data->reg_int_ps, state); |