summaryrefslogtreecommitdiffstats
path: root/drivers/extcon
diff options
context:
space:
mode:
authorChanwoo Choi <cw00.choi@samsung.com>2017-03-29 19:18:36 +0900
committerChanwoo Choi <cw00.choi@samsung.com>2017-04-06 11:12:45 +0900
commit70641a0a84e1ae3c6eee3d47ed5a482f85b11e3e (patch)
tree90578b5a9adda44594c6209ba2fe708b28783e1d /drivers/extcon
parentc42a880c3139cde603c5c83950ca7613aef7eedc (diff)
downloadlinux-70641a0a84e1ae3c6eee3d47ed5a482f85b11e3e.tar.gz
linux-70641a0a84e1ae3c6eee3d47ed5a482f85b11e3e.tar.bz2
linux-70641a0a84e1ae3c6eee3d47ed5a482f85b11e3e.zip
extcon: Use BIT() macro for the left-shift operation
This patch just uses the BIT() macro to make the code simple. Signed-off-by: Chanwoo Choi <cw00.choi@samsung.com>
Diffstat (limited to 'drivers/extcon')
-rw-r--r--drivers/extcon/extcon.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/extcon/extcon.c b/drivers/extcon/extcon.c
index 6817e047cd40..f422a78ba342 100644
--- 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;