iio: mma8452: Use correct type for return variable in IRQ handler
PATCH 1/1 iio: mma8452: Use correct type for return variable in IRQ handler
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.
--- drivers/iio/accel/mma8452.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/iio/accel/mma8452.c +1 -1
@@ -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 );
Signature · 1 line
2.20.1
Quoted 4 lines · 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 toirqreturn_t. This makes it easier to verify that the code is correct.
Quoted 21 lines
Signed-off-by Lars-Peter Clausen <[email protected]>--- drivers/iio/accel/mma8452.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)drivers/iio/accel/mma8452.c +1
-2@@ -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
Signature · 2 lines
With Best Regards, Andy Shevchenko
Quoted 7 lines · On Mon, 1 Nov 2021 12:37:19 +0200 Andy Shevchenko <[email protected]>…
Quoted 4 lines · 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 toirqreturn_t. This makes it easier to verify that the code is correct.Reviewed-by Andy Shevchenko <[email protected]>
Applied. Thanks,
Quoted 24 lines
Quoted 22 lines
Signed-off-by Lars-Peter Clausen <[email protected]>--- drivers/iio/accel/mma8452.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)drivers/iio/accel/mma8452.c +1
-2@@ -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