Skip to content

Commit

Permalink
gpio: 74xx-mmio: use bits.h macros for all masks
Browse files Browse the repository at this point in the history
Make use of the GENMASK() (far less error-prone, far more concise).

Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Reviewed-by: Linus Walleij <linus.walleij@linaro.org>
Signed-off-by: Bartosz Golaszewski <brgl@bgdev.pl>
  • Loading branch information
Andy Shevchenko authored and Bartosz Golaszewski committed Jul 19, 2022
1 parent d3054ba commit 28ba057
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion drivers/gpio/gpio-74xx-mmio.c
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
* Copyright (C) 2014 Alexander Shiyan <shc_work@mail.ru>
*/

#include <linux/bits.h>
#include <linux/err.h>
#include <linux/gpio/driver.h>
#include <linux/mod_devicetable.h>
Expand All @@ -14,7 +15,7 @@

#define MMIO_74XX_DIR_IN (0 << 8)
#define MMIO_74XX_DIR_OUT (1 << 8)
#define MMIO_74XX_BIT_CNT(x) ((x) & 0xff)
#define MMIO_74XX_BIT_CNT(x) ((x) & GENMASK(7, 0))

struct mmio_74xx_gpio_priv {
struct gpio_chip gc;
Expand Down

0 comments on commit 28ba057

Please sign in to comment.