提交 5f0d4fd6 编写于 作者: C Colin Ian King 提交者: Jonathan Cameron

iio: dac: ltc2632 remove redundant pointer chip_info and spi_dev_id

Pointers chip_info and spi_dev_id are being assigned but are never used
hence they are redundant and can be removed.

Cleans up clang warning:
warning: variable 'chip_info' set but not used [-Wunused-but-set-variable]
Signed-off-by: NColin Ian King <colin.king@canonical.com>
Signed-off-by: NJonathan Cameron <Jonathan.Cameron@huawei.com>
上级 366995df
...@@ -87,12 +87,7 @@ static int ltc2632_read_raw(struct iio_dev *indio_dev, ...@@ -87,12 +87,7 @@ static int ltc2632_read_raw(struct iio_dev *indio_dev,
int *val2, int *val2,
long m) long m)
{ {
struct ltc2632_chip_info *chip_info;
const struct ltc2632_state *st = iio_priv(indio_dev); const struct ltc2632_state *st = iio_priv(indio_dev);
const struct spi_device_id *spi_dev_id = spi_get_device_id(st->spi_dev);
chip_info = (struct ltc2632_chip_info *)spi_dev_id->driver_data;
switch (m) { switch (m) {
case IIO_CHAN_INFO_SCALE: case IIO_CHAN_INFO_SCALE:
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册