[PATCH 2/2] media: i2c: max9271: Use unsigned constants

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

 



Convert the bitfield definitions to use unsigned integers.

Signed-off-by: Kieran Bingham <kieran.bingham+renesas@xxxxxxxxxxxxxxxx>
---
 drivers/media/i2c/max9271.h | 60 ++++++++++++++++++-------------------
 1 file changed, 30 insertions(+), 30 deletions(-)

diff --git a/drivers/media/i2c/max9271.h b/drivers/media/i2c/max9271.h
index d78fb21441e9..4ef36a90c746 100644
--- a/drivers/media/i2c/max9271.h
+++ b/drivers/media/i2c/max9271.h
@@ -13,24 +13,24 @@
 #define MAX9271_DEFAULT_ADDR	0x40
 
 /* Register 0x02 */
-#define MAX9271_SPREAD_SPECT_0		(0 << 5)
-#define MAX9271_SPREAD_SPECT_05		(1 << 5)
-#define MAX9271_SPREAD_SPECT_15		(2 << 5)
-#define MAX9271_SPREAD_SPECT_1		(5 << 5)
-#define MAX9271_SPREAD_SPECT_2		(3 << 5)
-#define MAX9271_SPREAD_SPECT_3		(6 << 5)
-#define MAX9271_SPREAD_SPECT_4		(7 << 5)
+#define MAX9271_SPREAD_SPECT_0		(0U << 5)
+#define MAX9271_SPREAD_SPECT_05		(1U << 5)
+#define MAX9271_SPREAD_SPECT_15		(2U << 5)
+#define MAX9271_SPREAD_SPECT_1		(5U << 5)
+#define MAX9271_SPREAD_SPECT_2		(3U << 5)
+#define MAX9271_SPREAD_SPECT_3		(6U << 5)
+#define MAX9271_SPREAD_SPECT_4		(7U << 5)
 #define MAX9271_R02_RES			BIT(4)
-#define MAX9271_PCLK_AUTODETECT		(3 << 2)
+#define MAX9271_PCLK_AUTODETECT		(3U << 2)
 #define MAX9271_SERIAL_AUTODETECT	(0x03)
 /* Register 0x04 */
 #define MAX9271_SEREN			BIT(7)
 #define MAX9271_CLINKEN			BIT(6)
 #define MAX9271_PRBSEN			BIT(5)
 #define MAX9271_SLEEP			BIT(4)
-#define MAX9271_INTTYPE_I2C		(0 << 2)
-#define MAX9271_INTTYPE_UART		(1 << 2)
-#define MAX9271_INTTYPE_NONE		(2 << 2)
+#define MAX9271_INTTYPE_I2C		(0U << 2)
+#define MAX9271_INTTYPE_UART		(1U << 2)
+#define MAX9271_INTTYPE_NONE		(2U << 2)
 #define MAX9271_REVCCEN			BIT(1)
 #define MAX9271_FWDCCEN			BIT(0)
 /* Register 0x07 */
@@ -39,9 +39,9 @@
 #define MAX9271_BWS			BIT(5)
 #define MAX9271_ES			BIT(4)
 #define MAX9271_HVEN			BIT(2)
-#define MAX9271_EDC_1BIT_PARITY		(0 << 0)
-#define MAX9271_EDC_6BIT_CRC		(1 << 0)
-#define MAX9271_EDC_6BIT_HAMMING	(2 << 0)
+#define MAX9271_EDC_1BIT_PARITY		(0U << 0)
+#define MAX9271_EDC_6BIT_CRC		(1U << 0)
+#define MAX9271_EDC_6BIT_HAMMING	(2U << 0)
 /* Register 0x08 */
 #define MAX9271_INVVS			BIT(7)
 #define MAX9271_INVHS			BIT(6)
@@ -51,22 +51,22 @@
 #define MAX9271_ID			0x09
 /* Register 0x0d */
 #define MAX9271_I2CLOCACK		BIT(7)
-#define MAX9271_I2CSLVSH_1046NS_469NS	(3 << 5)
-#define MAX9271_I2CSLVSH_938NS_352NS	(2 << 5)
-#define MAX9271_I2CSLVSH_469NS_234NS	(1 << 5)
-#define MAX9271_I2CSLVSH_352NS_117NS	(0 << 5)
-#define MAX9271_I2CMSTBT_837KBPS	(7 << 2)
-#define MAX9271_I2CMSTBT_533KBPS	(6 << 2)
-#define MAX9271_I2CMSTBT_339KBPS	(5 << 2)
-#define MAX9271_I2CMSTBT_173KBPS	(4 << 2)
-#define MAX9271_I2CMSTBT_105KBPS	(3 << 2)
-#define MAX9271_I2CMSTBT_84KBPS		(2 << 2)
-#define MAX9271_I2CMSTBT_28KBPS		(1 << 2)
-#define MAX9271_I2CMSTBT_8KBPS		(0 << 2)
-#define MAX9271_I2CSLVTO_NONE		(3 << 0)
-#define MAX9271_I2CSLVTO_1024US		(2 << 0)
-#define MAX9271_I2CSLVTO_256US		(1 << 0)
-#define MAX9271_I2CSLVTO_64US		(0 << 0)
+#define MAX9271_I2CSLVSH_1046NS_469NS	(3U << 5)
+#define MAX9271_I2CSLVSH_938NS_352NS	(2U << 5)
+#define MAX9271_I2CSLVSH_469NS_234NS	(1U << 5)
+#define MAX9271_I2CSLVSH_352NS_117NS	(0U << 5)
+#define MAX9271_I2CMSTBT_837KBPS	(7U << 2)
+#define MAX9271_I2CMSTBT_533KBPS	(6U << 2)
+#define MAX9271_I2CMSTBT_339KBPS	(5U << 2)
+#define MAX9271_I2CMSTBT_173KBPS	(4U << 2)
+#define MAX9271_I2CMSTBT_105KBPS	(3U << 2)
+#define MAX9271_I2CMSTBT_84KBPS		(2U << 2)
+#define MAX9271_I2CMSTBT_28KBPS		(1U << 2)
+#define MAX9271_I2CMSTBT_8KBPS		(0U << 2)
+#define MAX9271_I2CSLVTO_NONE		(3U << 0)
+#define MAX9271_I2CSLVTO_1024US		(2U << 0)
+#define MAX9271_I2CSLVTO_256US		(1U << 0)
+#define MAX9271_I2CSLVTO_64US		(0U << 0)
 /* Register 0x0f */
 #define MAX9271_GPIO5OUT		BIT(5)
 #define MAX9271_GPIO4OUT		BIT(4)
-- 
2.25.1




[Index of Archives]     [Linux Input]     [Video for Linux]     [Gstreamer Embedded]     [Mplayer Users]     [Linux USB Devel]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [Yosemite Backpacking]

  Powered by Linux