Linux IIO development
 help / color / mirror / Atom feed
* [PATCH] iio: mma8452: Use correct type for return variable in IRQ handler
@ 2021-11-01 10:27 Lars-Peter Clausen
  2021-11-01 10:37 ` Andy Shevchenko
  0 siblings, 1 reply; 3+ messages in thread
From: Lars-Peter Clausen @ 2021-11-01 10:27 UTC (permalink / raw)
  To: Jonathan Cameron; +Cc: Martin Fuzzey, linux-iio, Lars-Peter Clausen

The IRQ handler's return type is irqreturn_t. The mma8452 uses a variable
to store the return value, but the variable is of type int. Change this to
irqreturn_t. This makes it easier to verify that the code is correct.

Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
---
 drivers/iio/accel/mma8452.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/iio/accel/mma8452.c b/drivers/iio/accel/mma8452.c
index 09c7f10fefb6..64b82b4503ad 100644
--- a/drivers/iio/accel/mma8452.c
+++ b/drivers/iio/accel/mma8452.c
@@ -1053,7 +1053,7 @@ static irqreturn_t mma8452_interrupt(int irq, void *p)
 {
 	struct iio_dev *indio_dev = p;
 	struct mma8452_data *data = iio_priv(indio_dev);
-	int ret = IRQ_NONE;
+	irqreturn_t ret = IRQ_NONE;
 	int src;
 
 	src = i2c_smbus_read_byte_data(data->client, MMA8452_INT_SRC);
-- 
2.20.1


^ permalink raw reply related	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2021-11-03 18:18 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2021-11-01 10:27 [PATCH] iio: mma8452: Use correct type for return variable in IRQ handler Lars-Peter Clausen
2021-11-01 10:37 ` Andy Shevchenko
2021-11-03 18:22   ` Jonathan Cameron

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox