aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/staging/iio
diff options
context:
space:
mode:
authorJonathan Cameron <Jonathan.Cameron@huawei.com>2022-02-06 19:03:16 +0000
committerJonathan Cameron <Jonathan.Cameron@huawei.com>2022-02-21 19:33:04 +0000
commitc27e1e1a2444939c1f2f8b5633083e2995692f28 (patch)
treeb11de6c3d9f47763ba113c6f6dc453599cd21a2b /drivers/staging/iio
parentstaging:iio:adc:ad7280a: Standardize extended ABI naming (diff)
downloadlinux-dev-c27e1e1a2444939c1f2f8b5633083e2995692f28.tar.xz
linux-dev-c27e1e1a2444939c1f2f8b5633083e2995692f28.zip
staging:iio:adc:ad7280a: Drop unused timestamp channel.
The driver doesn't support buffered mode, so a timestamp channel that is entirely hidden from userspace without buffer mode is rather pointless. Drop it. Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com> Reviewed-by: Marcelo Schmitt <marcelo.schmitt1@gmail.com> Link: https://lore.kernel.org/r/20220206190328.333093-9-jic23@kernel.org
Diffstat (limited to 'drivers/staging/iio')
-rw-r--r--drivers/staging/iio/adc/ad7280a.c14
1 files changed, 1 insertions, 13 deletions
diff --git a/drivers/staging/iio/adc/ad7280a.c b/drivers/staging/iio/adc/ad7280a.c
index 29edbda64230..c1ac46a8112e 100644
--- a/drivers/staging/iio/adc/ad7280a.c
+++ b/drivers/staging/iio/adc/ad7280a.c
@@ -613,16 +613,6 @@ static void ad7280_total_voltage_channel_init(struct iio_chan_spec *chan,
chan->scan_type.storagebits = 32;
}
-static void ad7280_timestamp_channel_init(struct iio_chan_spec *chan, int cnt)
-{
- chan->type = IIO_TIMESTAMP;
- chan->channel = -1;
- chan->scan_index = cnt;
- chan->scan_type.sign = 's';
- chan->scan_type.realbits = 64;
- chan->scan_type.storagebits = 64;
-}
-
static void ad7280_init_dev_channels(struct ad7280_state *st, int dev, int *cnt)
{
int addr, ch, i;
@@ -650,7 +640,7 @@ static int ad7280_channel_init(struct ad7280_state *st)
{
int dev, cnt = 0;
- st->channels = devm_kcalloc(&st->spi->dev, (st->slave_num + 1) * 12 + 2,
+ st->channels = devm_kcalloc(&st->spi->dev, (st->slave_num + 1) * 12 + 1,
sizeof(*st->channels), GFP_KERNEL);
if (!st->channels)
return -ENOMEM;
@@ -659,8 +649,6 @@ static int ad7280_channel_init(struct ad7280_state *st)
ad7280_init_dev_channels(st, dev, &cnt);
ad7280_total_voltage_channel_init(&st->channels[cnt], cnt, dev);
- cnt++;
- ad7280_timestamp_channel_init(&st->channels[cnt], cnt);
return cnt + 1;
}