Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1538181

[PATCH v2 5/6] rtc: mcp795: Prefer using the BIT() macro.

From Emil Bartczak <emilbart@gmail.com>
Newsgroups linux.kernel
Subject [PATCH v2 5/6] rtc: mcp795: Prefer using the BIT() macro.
Date 2016-12-08 00:30 +0100
Message-ID <sLTOW-6J2-29@gated-at.bofh.it> (permalink)
References <sLTOV-6J2-13@gated-at.bofh.it>
Organization linux.* mail to news gateway

Show all headers | View raw


This patch doesn't change the code but replaces all bitmask values
with the BIT(x) macro.

Signed-off-by: Emil Bartczak <emilbart@gmail.com>
---
 drivers/rtc/rtc-mcp795.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/rtc/rtc-mcp795.c b/drivers/rtc/rtc-mcp795.c
index 89b0ffa..8ed55f6 100644
--- a/drivers/rtc/rtc-mcp795.c
+++ b/drivers/rtc/rtc-mcp795.c
@@ -45,8 +45,8 @@
 #define MCP795_REG_MONTH	0x06
 #define MCP795_REG_CONTROL	0x08
 
-#define MCP795_ST_BIT	0x80
-#define MCP795_24_BIT	0x40
+#define MCP795_ST_BIT	BIT(7)
+#define MCP795_24_BIT	BIT(6)
 #define MCP795_LP_BIT	BIT(5)
 #define MCP795_EXTOSC_BIT	BIT(3)
 #define MCP795_OSCON_BIT	BIT(5)
-- 
2.7.4

Back to linux.kernel | Previous | NextPrevious in thread | Next in thread | Find similar | Unroll thread


Thread

[PATCH v2 0/6] Provides bug fixes for rtc-mcp795.c Emil Bartczak <emilbart@gmail.com> - 2016-12-08 00:30 +0100
  [PATCH v2 4/6] rtc: mcp795: fix month write resetting date to 1. Emil Bartczak <emilbart@gmail.com> - 2016-12-08 00:30 +0100
  [PATCH v2 3/6] rtc: mcp795: fix time range difference between linux and RTC chip. Emil Bartczak <emilbart@gmail.com> - 2016-12-08 00:30 +0100
  [PATCH v2 5/6] rtc: mcp795: Prefer using the BIT() macro. Emil Bartczak <emilbart@gmail.com> - 2016-12-08 00:30 +0100
  [PATCH v2 1/6] rtc: mcp795: use bcd2bin/bin2bcd. Emil Bartczak <emilbart@gmail.com> - 2016-12-08 00:30 +0100
  Re: [PATCH v2 0/6] Provides bug fixes for rtc-mcp795.c Alexandre Belloni <alexandre.belloni@free-electrons.com> - 2016-12-08 01:40 +0100

csiph-web