diff mbox series

[6/6] iio:light:ltr501: Drop unnecessary cast of parameter in regmap_bulk_read

Message ID 20200405180321.1737310-7-jic23@kernel.org (mailing list archive)
State New, archived
Headers show
Series IIO: Tidy up parameters to regmap_bulk_* calls | expand

Commit Message

Jonathan Cameron April 5, 2020, 6:03 p.m. UTC
From: Jonathan Cameron <Jonathan.Cameron@huawei.com>

This only occurs once in the driver and isn't needed in this case either,
so drop it.

Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
---
 drivers/iio/light/ltr501.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Comments

Alexandru Ardelean April 13, 2020, 4:33 a.m. UTC | #1
On Sun, 2020-04-05 at 19:03 +0100, jic23@kernel.org wrote:
> From: Jonathan Cameron <Jonathan.Cameron@huawei.com>
> 
> This only occurs once in the driver and isn't needed in this case either,
> so drop it.
> 

Reviewed-by: Alexandru Ardelean <alexandru.ardelean@analog.com>

> Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
> ---
>  drivers/iio/light/ltr501.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/drivers/iio/light/ltr501.c b/drivers/iio/light/ltr501.c
> index 71f99d2a22c1..0626927251bb 100644
> --- a/drivers/iio/light/ltr501.c
> +++ b/drivers/iio/light/ltr501.c
> @@ -1263,7 +1263,7 @@ static irqreturn_t ltr501_trigger_handler(int irq, void
> *p)
>  
>  	if (mask & LTR501_STATUS_ALS_RDY) {
>  		ret = regmap_bulk_read(data->regmap, LTR501_ALS_DATA1,
> -				       (u8 *)als_buf, sizeof(als_buf));
> +				       als_buf, sizeof(als_buf));
>  		if (ret < 0)
>  			return ret;
>  		if (test_bit(0, indio_dev->active_scan_mask))
diff mbox series

Patch

diff --git a/drivers/iio/light/ltr501.c b/drivers/iio/light/ltr501.c
index 71f99d2a22c1..0626927251bb 100644
--- a/drivers/iio/light/ltr501.c
+++ b/drivers/iio/light/ltr501.c
@@ -1263,7 +1263,7 @@  static irqreturn_t ltr501_trigger_handler(int irq, void *p)
 
 	if (mask & LTR501_STATUS_ALS_RDY) {
 		ret = regmap_bulk_read(data->regmap, LTR501_ALS_DATA1,
-				       (u8 *)als_buf, sizeof(als_buf));
+				       als_buf, sizeof(als_buf));
 		if (ret < 0)
 			return ret;
 		if (test_bit(0, indio_dev->active_scan_mask))