Skip to content

Commit

Permalink
extcon: Use BIT() macro for the left-shift operation
Browse files Browse the repository at this point in the history
This patch just uses the BIT() macro to make the code simple.

Signed-off-by: Chanwoo Choi <cw00.choi@samsung.com>
  • Loading branch information
chanwoochoi committed Apr 6, 2017
1 parent c42a880 commit 70641a0
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion drivers/extcon/extcon.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down

0 comments on commit 70641a0

Please sign in to comment.