Commit 9403ac88220d79f8822e22c875ad1ebd7ffbea6f

Authored by Chander Kashyap
Committed by Kukjin Kim
1 parent 6ce4eac1f6

irqchip: exynos-combiner: remove hard-coded irq_base value

Replace irq_domain_add_simple with "irq_domain_add_linear" in order to use
linear irq domain, and to remove hardcoded irq_base_value.

Signed-off-by: Chander Kashyap <chander.kashyap@linaro.org>
Reviewed-by: Tomasz Figa <t.figa@samsung.com>
Signed-off-by: Kukjin Kim <kgene.kim@samsung.com>

Showing 1 changed file with 3 additions and 12 deletions Side-by-side Diff

drivers/irqchip/exynos-combiner.c
... ... @@ -171,8 +171,7 @@
171 171  
172 172 static void __init combiner_init(void __iomem *combiner_base,
173 173 struct device_node *np,
174   - unsigned int max_nr,
175   - int irq_base)
  174 + unsigned int max_nr)
176 175 {
177 176 int i, irq;
178 177 unsigned int nr_irq;
... ... @@ -186,7 +185,7 @@
186 185 return;
187 186 }
188 187  
189   - combiner_irq_domain = irq_domain_add_simple(np, nr_irq, irq_base,
  188 + combiner_irq_domain = irq_domain_add_linear(np, nr_irq,
190 189 &combiner_irq_domain_ops, combiner_data);
191 190 if (WARN_ON(!combiner_irq_domain)) {
192 191 pr_warning("%s: irq domain init failed\n", __func__);
... ... @@ -207,7 +206,6 @@
207 206 {
208 207 void __iomem *combiner_base;
209 208 unsigned int max_nr = 20;
210   - int irq_base = -1;
211 209  
212 210 combiner_base = of_iomap(np, 0);
213 211 if (!combiner_base) {
... ... @@ -221,14 +219,7 @@
221 219 __func__, max_nr);
222 220 }
223 221  
224   - /*
225   - * FIXME: This is a hardwired COMBINER_IRQ(0,0). Once all devices
226   - * get their IRQ from DT, remove this in order to get dynamic
227   - * allocation.
228   - */
229   - irq_base = 160;
230   -
231   - combiner_init(combiner_base, np, max_nr, irq_base);
  222 + combiner_init(combiner_base, np, max_nr);
232 223  
233 224 return 0;
234 225 }