projects
/
GitHub
/
moto-9609
/
android_kernel_motorola_exynos9610.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
|
blame
|
history
diff --git
a/drivers/extcon/extcon.c
b/drivers/extcon/extcon.c
index 6817e047cd40d5e64f88f105742a1192c55a6508..f422a78ba342428c6e4da7d4bb4a15ebfcf92ec9 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;