[PATCH] drivers: iio: light: Fix sparse warnings

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Fixing below warnings:

drivers/iio/light/max44000.c:217:18: warning: cast to restricted __be16
drivers/iio/light/max44000.c:217:18: warning: cast to restricted __be16
drivers/iio/light/max44000.c:217:18: warning: cast to restricted __be16
drivers/iio/light/max44000.c:217:18: warning: cast to restricted __be16

Signed-off-by: Sandhya Bankar <bankarsandhya512@xxxxxxxxx>
---
 drivers/iio/light/max44000.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/iio/light/max44000.c b/drivers/iio/light/max44000.c
index 6511b20..1ea9af9 100644
--- a/drivers/iio/light/max44000.c
+++ b/drivers/iio/light/max44000.c
@@ -214,7 +214,7 @@ static int max44000_read_alsval(struct max44000_data *data)
 	if (ret < 0)
 		return ret;
 
-	regval = be16_to_cpu(regval);
+	be16_to_cpus(&regval);
 
 	/*
 	 * Overflow is explained on datasheet page 17.
-- 
1.8.3.1

--
To unsubscribe from this list: send the line "unsubscribe linux-iio" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html



[Index of Archives]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Input]     [Linux Kernel]     [Linux SCSI]     [X.org]

  Powered by Linux