OSDN Git Service
(root)
/
tomoyo
/
tomoyo-test1.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
c42a880
)
extcon: Use BIT() macro for the left-shift operation
author
Chanwoo Choi
<cw00.choi@samsung.com>
Wed, 29 Mar 2017 10:18:36 +0000
(19:18 +0900)
committer
Chanwoo Choi
<cw00.choi@samsung.com>
Thu, 6 Apr 2017 02:12:45 +0000
(11:12 +0900)
This patch just uses the BIT() macro to make the code simple.
Signed-off-by: Chanwoo Choi <cw00.choi@samsung.com>
drivers/extcon/extcon.c
patch
|
blob
|
history
diff --git
a/drivers/extcon/extcon.c
b/drivers/extcon/extcon.c
index
6817e04
..
f422a78
100644
(file)
--- a/
drivers/extcon/extcon.c
+++ b/
drivers/extcon/extcon.c
@@
-377,7
+377,7
@@
static ssize_t state_show(struct device *dev, struct device_attribute *attr,
for (i = 0; i < edev->max_supported; i++) {
count += sprintf(buf + count, "%s=%d\n",
extcon_info[edev->supported_cable[i]].name,
- !!(edev->state &
(1 <<
i)));
+ !!(edev->state &
BIT(
i)));
}
return count;