Commit 70641a0a authored by Chanwoo Choi's avatar Chanwoo Choi

extcon: Use BIT() macro for the left-shift operation

This patch just uses the BIT() macro to make the code simple.
Signed-off-by: default avatarChanwoo Choi <cw00.choi@samsung.com>
parent c42a880c
...@@ -377,7 +377,7 @@ static ssize_t state_show(struct device *dev, struct device_attribute *attr, ...@@ -377,7 +377,7 @@ static ssize_t state_show(struct device *dev, struct device_attribute *attr,
for (i = 0; i < edev->max_supported; i++) { for (i = 0; i < edev->max_supported; i++) {
count += sprintf(buf + count, "%s=%d\n", count += sprintf(buf + count, "%s=%d\n",
extcon_info[edev->supported_cable[i]].name, extcon_info[edev->supported_cable[i]].name,
!!(edev->state & (1 << i))); !!(edev->state & BIT(i)));
} }
return count; return count;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment