Commit 30cefeac authored by Grygorii Strashko's avatar Grygorii Strashko Committed by Linus Walleij

gpio: omap: fix static checker warning

This patch fixes below static checker warning by changing
type of irq field in struct gpio_bank from u16 to int.

drivers/gpio/gpio-omap.c:1191 omap_gpio_probe()
	warn: assigning (-6) to unsigned variable 'bank->irq'

drivers/gpio/gpio-omap.c
  1188          bank->irq = platform_get_irq(pdev, 0);
  1189          if (bank->irq <= 0) {

bank->irq is u16.

  1190                  if (!bank->irq)
  1191                          bank->irq = -ENXIO;

Does not work.

  1192                  if (bank->irq != -EPROBE_DEFER)

Does not work.

  1193                          dev_err(dev,
  1194                                  "can't get irq resource ret=%d\n", bank->irq);
  1195                  return bank->irq;
  1196          }

Fixes: commit 89d18e3a: "gpio: omap: switch to use platform_get_irq"
Signed-off-by: default avatarGrygorii Strashko <grygorii.strashko@ti.com>
Signed-off-by: default avatarLinus Walleij <linus.walleij@linaro.org>
parent 26ba9cd4
...@@ -51,7 +51,7 @@ struct gpio_regs { ...@@ -51,7 +51,7 @@ struct gpio_regs {
struct gpio_bank { struct gpio_bank {
struct list_head node; struct list_head node;
void __iomem *base; void __iomem *base;
u16 irq; int irq;
u32 non_wakeup_gpios; u32 non_wakeup_gpios;
u32 enabled_non_wakeup_gpios; u32 enabled_non_wakeup_gpios;
struct gpio_regs context; struct gpio_regs context;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment