diff options
author | Sergio Paracuellos <sergio.paracuellos@gmail.com> | 2016-11-10 19:16:42 +0100 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2016-11-14 15:43:19 +0100 |
commit | 27e8d4609436f8cb9c35f090335c9cd840d4150e (patch) | |
tree | d7171dde39168353fe1bb09db6a787b30650542a /drivers/staging/wlan-ng | |
parent | caac19b97d4745ff1ec1bbd0b72cbf769c96079d (diff) |
staging: wlan-ng: use GENMASK macro in two bitwise operations in prism2sta.c
This patch replace actual mask stuff using BIT macros with
or operators to make use of GENMASK macro which simplifies
code clearity and readibility.
It applies for two bitwise operations included in prism2sta.c source file.
Signed-off-by: Sergio Paracuellos <sergio.paracuellos@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/staging/wlan-ng')
-rw-r--r-- | drivers/staging/wlan-ng/prism2sta.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/staging/wlan-ng/prism2sta.c b/drivers/staging/wlan-ng/prism2sta.c index 351f08d6a5d9..984804b92e05 100644 --- a/drivers/staging/wlan-ng/prism2sta.c +++ b/drivers/staging/wlan-ng/prism2sta.c @@ -654,8 +654,8 @@ static int prism2sta_getcardinfo(struct wlandevice *wlandev) hw->ident_sta_fw.minor = le16_to_cpu(hw->ident_sta_fw.minor); /* strip out the 'special' variant bits */ - hw->mm_mods = hw->ident_sta_fw.variant & (BIT(14) | BIT(15)); - hw->ident_sta_fw.variant &= ~((u16)(BIT(14) | BIT(15))); + hw->mm_mods = hw->ident_sta_fw.variant & GENMASK(15, 14); + hw->ident_sta_fw.variant &= ~((u16)GENMASK(15, 14)); if (hw->ident_sta_fw.id == 0x1f) { netdev_info(wlandev->netdev, |