Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

iio: xilinx-xadc: Remove `irq` field from state struct

Since commit 2a9685d1a3b7 ("iio: adc: xilinx: use more devres helpers and
remove remove()") the `irq` field from XADC driver state struct is only
used in the `probe()` function.

Use the local `irq` variable throughout the `probe()` function and remove
the now unused field from the state struct.

Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
Link: https://lore.kernel.org/r/20211017121551.24063-1-lars@metafoo.de
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>

authored by

Lars-Peter Clausen and committed by
Jonathan Cameron
dd4efd05 94be878c

+2 -4
+2 -3
drivers/iio/adc/xilinx-xadc-core.c
··· 1332 1332 1333 1333 xadc = iio_priv(indio_dev); 1334 1334 xadc->ops = id->data; 1335 - xadc->irq = irq; 1336 1335 init_completion(&xadc->completion); 1337 1336 mutex_init(&xadc->mutex); 1338 1337 spin_lock_init(&xadc->lock); ··· 1396 1397 } 1397 1398 } 1398 1399 1399 - ret = devm_request_irq(dev, xadc->irq, xadc->ops->interrupt_handler, 0, 1400 + ret = devm_request_irq(dev, irq, xadc->ops->interrupt_handler, 0, 1400 1401 dev_name(dev), indio_dev); 1401 1402 if (ret) 1402 1403 return ret; ··· 1406 1407 if (ret) 1407 1408 return ret; 1408 1409 1409 - ret = xadc->ops->setup(pdev, indio_dev, xadc->irq); 1410 + ret = xadc->ops->setup(pdev, indio_dev, irq); 1410 1411 if (ret) 1411 1412 return ret; 1412 1413
-1
drivers/iio/adc/xilinx-xadc.h
··· 67 67 spinlock_t lock; 68 68 69 69 struct completion completion; 70 - int irq; 71 70 }; 72 71 73 72 enum xadc_type {