From eec1011443067c8d08edd538cc35d0e579cbaf6d Mon Sep 17 00:00:00 2001 From: Linus Walleij Date: Tue, 16 Oct 2012 19:43:53 +0200 Subject: [PATCH] --- yaml --- r: 336819 b: refs/heads/master c: a362605b341d95e7209ead8052363cb28dda1c44 h: refs/heads/master i: 336817: 426e17511d565003450c428e51e33b39eb3cc294 336815: 77fb1bdc45f20278092706b68b3054eb9e285b6f v: v3 --- [refs] | 2 +- trunk/drivers/gpio/gpio-tc3589x.c | 20 +++++++++----------- 2 files changed, 10 insertions(+), 12 deletions(-) diff --git a/[refs] b/[refs] index c9fb40f3b4ae..459225503e3a 100644 --- a/[refs] +++ b/[refs] @@ -1,2 +1,2 @@ --- -refs/heads/master: 7385500a49b769c95438c111aff92110b06ff751 +refs/heads/master: a362605b341d95e7209ead8052363cb28dda1c44 diff --git a/trunk/drivers/gpio/gpio-tc3589x.c b/trunk/drivers/gpio/gpio-tc3589x.c index 1e48317e70fb..8c8447c7d2a8 100644 --- a/trunk/drivers/gpio/gpio-tc3589x.c +++ b/trunk/drivers/gpio/gpio-tc3589x.c @@ -292,17 +292,15 @@ static int tc3589x_gpio_irq_init(struct tc3589x_gpio *tc3589x_gpio, { int base = tc3589x_gpio->irq_base; - if (base) { - tc3589x_gpio->domain = irq_domain_add_legacy( - NULL, tc3589x_gpio->chip.ngpio, base, - 0, &tc3589x_irq_ops, tc3589x_gpio); - } - else { - tc3589x_gpio->domain = irq_domain_add_linear( - np, tc3589x_gpio->chip.ngpio, - &tc3589x_irq_ops, tc3589x_gpio); - } - + /* + * If this results in a linear domain, irq_create_mapping() will + * take care of allocating IRQ descriptors at runtime. When a base + * is provided, the IRQ descriptors will be allocated when the + * domain is instantiated. + */ + tc3589x_gpio->domain = irq_domain_add_simple(np, + tc3589x_gpio->chip.ngpio, base, &tc3589x_irq_ops, + tc3589x_gpio); if (!tc3589x_gpio->domain) { dev_err(tc3589x_gpio->dev, "Failed to create irqdomain\n"); return -ENOSYS;