diff options
author | Linus Walleij <linus.walleij@linaro.org> | 2016-02-22 13:47:49 +0100 |
---|---|---|
committer | Linus Walleij <linus.walleij@linaro.org> | 2016-02-22 13:47:49 +0100 |
commit | 3cf42efc3479806bc5db5176fd440d23bb73854b (patch) | |
tree | a6a0a57cbe89a4f779625f8ce6e8ebc7ea49f2c0 /drivers/gpio/gpio-davinci.c | |
parent | 6ec9249a83b00a754af435ed57ad02ffed105d93 (diff) | |
parent | 9d8cc89c316d9cc8ff269068ac8f904f13b5a70d (diff) |
Merge branch 'devel' into for-next
Diffstat (limited to 'drivers/gpio/gpio-davinci.c')
-rw-r--r-- | drivers/gpio/gpio-davinci.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/drivers/gpio/gpio-davinci.c b/drivers/gpio/gpio-davinci.c index cd007a67b302..dd262f00295d 100644 --- a/drivers/gpio/gpio-davinci.c +++ b/drivers/gpio/gpio-davinci.c @@ -258,6 +258,8 @@ static int davinci_gpio_probe(struct platform_device *pdev) spin_lock_init(&chips[i].lock); regs = gpio2regs(base); + if (!regs) + return -ENXIO; chips[i].regs = regs; chips[i].set_data = ®s->set_data; chips[i].clr_data = ®s->clr_data; @@ -433,8 +435,7 @@ static struct irq_chip *davinci_gpio_get_irq_chip(unsigned int irq) { static struct irq_chip_type gpio_unbanked; - gpio_unbanked = *container_of(irq_get_chip(irq), - struct irq_chip_type, chip); + gpio_unbanked = *irq_data_get_chip_type(irq_get_irq_data(irq)); return &gpio_unbanked.chip; }; |