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 d3054ba1db ("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: d3054ba1db ("gpio: 74xx-mmio: Check MMIO_74XX_DIR_IN flag in mmio_74xx_dir_in()")
Reported-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Signed-off-by: Bartosz Golaszewski <brgl@bgdev.pl>
This commit is contained in:
Andy Shevchenko 2022-07-26 12:14:48 +03:00 committed by Bartosz Golaszewski
parent f2a2f2c9ae
commit e3c1d6c8c5

View File

@ -13,8 +13,8 @@
#include <linux/platform_device.h>
#include <linux/property.h>
#define MMIO_74XX_DIR_IN (0 << 8)
#define MMIO_74XX_DIR_OUT (1 << 8)
#define MMIO_74XX_DIR_IN BIT(8)
#define MMIO_74XX_DIR_OUT BIT(9)
#define MMIO_74XX_BIT_CNT(x) ((x) & GENMASK(7, 0))
struct mmio_74xx_gpio_priv {