diff options
author | Viresh Kumar <viresh.kumar@linaro.org> | 2012-11-26 15:48:53 +0530 |
---|---|---|
committer | Viresh Kumar <viresh.kumar@linaro.org> | 2012-11-26 15:48:53 +0530 |
commit | 53d74fd79db19aae506de892273198b160c2ee95 (patch) | |
tree | f6abab77c62d4931c09b8dffff2bc871d809a500 /drivers/gpio/gpio-tc3589x.c | |
parent | 22595e28157e9a55f285a4971bd1d43b8457ffd5 (diff) | |
parent | b53bc2819a71099ecfc3d61ba0796b3dcc6be321 (diff) |
Merge commit 'gpio-lw/devel' into spear-for-3.8
This merges dependency branch gpio-lw/devel for SPEAr DT updates.
Diffstat (limited to 'drivers/gpio/gpio-tc3589x.c')
-rw-r--r-- | drivers/gpio/gpio-tc3589x.c | 20 |
1 files changed, 9 insertions, 11 deletions
diff --git a/drivers/gpio/gpio-tc3589x.c b/drivers/gpio/gpio-tc3589x.c index 1e48317e70fb..8c8447c7d2a8 100644 --- a/drivers/gpio/gpio-tc3589x.c +++ b/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; |