From: Chanwoo Choi Date: Wed, 29 Mar 2017 10:18:36 +0000 (+0900) Subject: extcon: Use BIT() macro for the left-shift operation X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=70641a0a84e1ae3c6eee3d47ed5a482f85b11e3e;p=GitHub%2Fmoto-9609%2Fandroid_kernel_motorola_exynos9610.git 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 --- 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;