Skip to content

Commit 68d4cb8

Browse files
Vladimir ZapolskiyWim Van Sebroeck
Vladimir Zapolskiy
authored and
Wim Van Sebroeck
committed
watchdog: imx2_wdt: use preferred BIT macro instead of open coded values
This is a nonfunctional change, declare register bit values with BIT() helper macro. The issues are reported by checkpatch: CHECK: Prefer using the BIT macro #40: FILE: drivers/watchdog/imx2_wdt.c:40: +#define IMX2_WDT_WCR_WDA (1 << 5) /* -> External Reset WDOG_B */ etc. Signed-off-by: Vladimir Zapolskiy <[email protected]> Signed-off-by: Guenter Roeck <[email protected]> Signed-off-by: Wim Van Sebroeck <[email protected]>
1 parent 7dd2ce7 commit 68d4cb8

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

drivers/watchdog/imx2_wdt.c

+6-6
Original file line numberDiff line numberDiff line change
@@ -37,18 +37,18 @@
3737

3838
#define IMX2_WDT_WCR 0x00 /* Control Register */
3939
#define IMX2_WDT_WCR_WT (0xFF << 8) /* -> Watchdog Timeout Field */
40-
#define IMX2_WDT_WCR_WDA (1 << 5) /* -> External Reset WDOG_B */
41-
#define IMX2_WDT_WCR_SRS (1 << 4) /* -> Software Reset Signal */
42-
#define IMX2_WDT_WCR_WRE (1 << 3) /* -> WDOG Reset Enable */
43-
#define IMX2_WDT_WCR_WDE (1 << 2) /* -> Watchdog Enable */
44-
#define IMX2_WDT_WCR_WDZST (1 << 0) /* -> Watchdog timer Suspend */
40+
#define IMX2_WDT_WCR_WDA BIT(5) /* -> External Reset WDOG_B */
41+
#define IMX2_WDT_WCR_SRS BIT(4) /* -> Software Reset Signal */
42+
#define IMX2_WDT_WCR_WRE BIT(3) /* -> WDOG Reset Enable */
43+
#define IMX2_WDT_WCR_WDE BIT(2) /* -> Watchdog Enable */
44+
#define IMX2_WDT_WCR_WDZST BIT(0) /* -> Watchdog timer Suspend */
4545

4646
#define IMX2_WDT_WSR 0x02 /* Service Register */
4747
#define IMX2_WDT_SEQ1 0x5555 /* -> service sequence 1 */
4848
#define IMX2_WDT_SEQ2 0xAAAA /* -> service sequence 2 */
4949

5050
#define IMX2_WDT_WRSR 0x04 /* Reset Status Register */
51-
#define IMX2_WDT_WRSR_TOUT (1 << 1) /* -> Reset due to Timeout */
51+
#define IMX2_WDT_WRSR_TOUT BIT(1) /* -> Reset due to Timeout */
5252

5353
#define IMX2_WDT_WMCR 0x08 /* Misc Register */
5454

0 commit comments

Comments
 (0)