diff options
author | Amitoj Kaur Chawla <amitoj1606@gmail.com> | 2015-10-16 22:11:36 +0530 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2015-10-16 23:05:17 -0700 |
commit | 79f2af620ef5ae6a6ddf4a3da65568c90c0c5e25 (patch) | |
tree | 4c55c24510b0080d98547de6c1e8c4b2892d8803 /drivers/staging/panel/panel.c | |
parent | staging: skein: Remove useless initialisation (diff) | |
download | linux-dev-79f2af620ef5ae6a6ddf4a3da65568c90c0c5e25.tar.xz linux-dev-79f2af620ef5ae6a6ddf4a3da65568c90c0c5e25.zip |
staging: panel: Prefer using BIT Macro
Replace bit shifting on 1 with the BIT(x) Macro
The semantic patch used to find this is:
@@ int g; @@
-(1 << g)
+BIT(g)
Signed-off-by: Amitoj Kaur Chawla <amitoj1606@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/staging/panel/panel.c')
-rw-r--r-- | drivers/staging/panel/panel.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/drivers/staging/panel/panel.c b/drivers/staging/panel/panel.c index a7e38758dc55..b47da2b44689 100644 --- a/drivers/staging/panel/panel.c +++ b/drivers/staging/panel/panel.c @@ -1794,7 +1794,7 @@ static void phys_scan_contacts(void) * So we'll scan them. */ for (bit = 0; bit < 8; bit++) { - bitval = 1 << bit; + bitval = BIT(bit); if (!(scan_mask_o & bitval)) /* skip unused bits */ continue; @@ -2060,12 +2060,12 @@ static int input_name2mask(const char *name, pmask_t *mask, pmask_t *value, return 0; /* input name not found */ neg = (in & 1); /* odd (lower) names are negated */ in >>= 1; - im |= (1 << in); + im |= BIT(in); name++; if (isdigit(*name)) { out = *name - '0'; - om |= (1 << out); + om |= BIT(out); } else if (*name == '-') { out = 8; } else { |