diff options
author | Madhumitha Prabakaran <madhumithabiw@gmail.com> | 2019-03-28 10:53:33 -0500 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2019-03-29 17:15:31 +0100 |
commit | 4e1a0d1142584d686f4e76063891787d45860611 (patch) | |
tree | eb004ae9c1d0518d21a567d8fc0312b3157b42ee /drivers/staging/rtl8192u/r8180_93cx6.c | |
parent | 7a4f9419eb9458b4497f6b84e1d2831cae45deda (diff) |
Staging: rtl8192u: Use BIT macro
Use BIT macro, as kernel provides the macro for improving uniform
and more readable way to define these constants.
Issue suggested by Coccinelle.
Signed-off-by: Madhumitha Prabakaran <madhumithabiw@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/staging/rtl8192u/r8180_93cx6.c')
-rw-r--r-- | drivers/staging/rtl8192u/r8180_93cx6.c | 24 |
1 files changed, 12 insertions, 12 deletions
diff --git a/drivers/staging/rtl8192u/r8180_93cx6.c b/drivers/staging/rtl8192u/r8180_93cx6.c index 163daed789b4..f98bb11a66af 100644 --- a/drivers/staging/rtl8192u/r8180_93cx6.c +++ b/drivers/staging/rtl8192u/r8180_93cx6.c @@ -125,21 +125,21 @@ int eprom_read(struct net_device *dev, u32 addr) if (priv->epromtype == EPROM_93c56) { addr_str[7] = addr & 1; - addr_str[6] = addr & (1 << 1); - addr_str[5] = addr & (1 << 2); - addr_str[4] = addr & (1 << 3); - addr_str[3] = addr & (1 << 4); - addr_str[2] = addr & (1 << 5); - addr_str[1] = addr & (1 << 6); - addr_str[0] = addr & (1 << 7); + addr_str[6] = addr & BIT(1); + addr_str[5] = addr & BIT(2); + addr_str[4] = addr & BIT(3); + addr_str[3] = addr & BIT(4); + addr_str[2] = addr & BIT(5); + addr_str[1] = addr & BIT(6); + addr_str[0] = addr & BIT(7); addr_len = 8; } else { addr_str[5] = addr & 1; - addr_str[4] = addr & (1 << 1); - addr_str[3] = addr & (1 << 2); - addr_str[2] = addr & (1 << 3); - addr_str[1] = addr & (1 << 4); - addr_str[0] = addr & (1 << 5); + addr_str[4] = addr & BIT(1); + addr_str[3] = addr & BIT(2); + addr_str[2] = addr & BIT(3); + addr_str[1] = addr & BIT(4); + addr_str[0] = addr & BIT(5); addr_len = 6; } eprom_cs(dev, 1); |