소스 검색

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>
Chanwoo Choi 8 년 전
부모
커밋
70641a0a84
1개의 변경된 파일1개의 추가작업 그리고 1개의 파일을 삭제
  1. 1 1
      drivers/extcon/extcon.c

+ 1 - 1
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;