Skip to content

Commit

Permalink
gpio: pca953x: Use bitmap API over implicit GCC extension
Browse files Browse the repository at this point in the history
In IRQ handler we have to clear bitmap before use. Currently
the GCC extension has been used for that. For sake of the consistency
switch to bitmap API. As expected bloat-o-meter shows no difference
in the object size.

Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Reviewed-by: Bartosz Golaszewski <bgolaszewski@baylibre.com>
Link: https://lore.kernel.org/r/20200930142013.59247-1-andriy.shevchenko@linux.intel.com
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
  • Loading branch information
Andy Shevchenko authored and Linus Walleij committed Oct 1, 2020
1 parent 17479aa commit e09e200
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion drivers/gpio/gpio-pca953x.c
Original file line number Diff line number Diff line change
Expand Up @@ -814,10 +814,12 @@ static irqreturn_t pca953x_irq_handler(int irq, void *devid)
{
struct pca953x_chip *chip = devid;
struct gpio_chip *gc = &chip->gpio_chip;
DECLARE_BITMAP(pending, MAX_LINE) = {};
DECLARE_BITMAP(pending, MAX_LINE);
int level;
bool ret;

bitmap_zero(pending, MAX_LINE);

mutex_lock(&chip->i2c_lock);
ret = pca953x_irq_pending(chip, pending);
mutex_unlock(&chip->i2c_lock);
Expand Down

0 comments on commit e09e200

Please sign in to comment.