Skip to content

Commit e09e200

Browse files
andy-shevLinus Walleij
authored andcommitted
gpio: pca953x: Use bitmap API over implicit GCC extension
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>
1 parent 17479aa commit e09e200

1 file changed

Lines changed: 3 additions & 1 deletion

File tree

drivers/gpio/gpio-pca953x.c

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -814,10 +814,12 @@ static irqreturn_t pca953x_irq_handler(int irq, void *devid)
814814
{
815815
struct pca953x_chip *chip = devid;
816816
struct gpio_chip *gc = &chip->gpio_chip;
817-
DECLARE_BITMAP(pending, MAX_LINE) = {};
817+
DECLARE_BITMAP(pending, MAX_LINE);
818818
int level;
819819
bool ret;
820820

821+
bitmap_zero(pending, MAX_LINE);
822+
821823
mutex_lock(&chip->i2c_lock);
822824
ret = pca953x_irq_pending(chip, pending);
823825
mutex_unlock(&chip->i2c_lock);

0 commit comments

Comments
 (0)