summaryrefslogtreecommitdiff
path: root/drivers/gpio/gpio-davinci.c
diff options
context:
space:
mode:
authorLinus Walleij <linus.walleij@linaro.org>2016-02-22 15:47:49 +0300
committerLinus Walleij <linus.walleij@linaro.org>2016-02-22 15:47:49 +0300
commit3cf42efc3479806bc5db5176fd440d23bb73854b (patch)
treea6a0a57cbe89a4f779625f8ce6e8ebc7ea49f2c0 /drivers/gpio/gpio-davinci.c
parent6ec9249a83b00a754af435ed57ad02ffed105d93 (diff)
parent9d8cc89c316d9cc8ff269068ac8f904f13b5a70d (diff)
downloadlinux-3cf42efc3479806bc5db5176fd440d23bb73854b.tar.xz
Merge branch 'devel' into for-next
Diffstat (limited to 'drivers/gpio/gpio-davinci.c')
-rw-r--r--drivers/gpio/gpio-davinci.c5
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 = &regs->set_data;
chips[i].clr_data = &regs->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;
};