Skip to content

Commit e3c1d6c

Browse files
andy-shevbrgl
authored andcommitted
gpio: 74xx-mmio: Use bits instead of plain numbers for flags
The initial code was misleading to use bitwise AND against plain number, and the commit d3054ba ("gpio: 74xx-mmio: Check MMIO_74XX_DIR_IN flag in mmio_74xx_dir_in()") missed that. Switch definitions to be defined bits for the correct comparison. Fixes: d3054ba ("gpio: 74xx-mmio: Check MMIO_74XX_DIR_IN flag in mmio_74xx_dir_in()") Reported-by: Dan Carpenter <[email protected]> Signed-off-by: Andy Shevchenko <[email protected]> Signed-off-by: Bartosz Golaszewski <[email protected]>
1 parent f2a2f2c commit e3c1d6c

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

drivers/gpio/gpio-74xx-mmio.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,8 +13,8 @@
1313
#include <linux/platform_device.h>
1414
#include <linux/property.h>
1515

16-
#define MMIO_74XX_DIR_IN (0 << 8)
17-
#define MMIO_74XX_DIR_OUT (1 << 8)
16+
#define MMIO_74XX_DIR_IN BIT(8)
17+
#define MMIO_74XX_DIR_OUT BIT(9)
1818
#define MMIO_74XX_BIT_CNT(x) ((x) & GENMASK(7, 0))
1919

2020
struct mmio_74xx_gpio_priv {

0 commit comments

Comments
 (0)