diff options
author | Aaro Koskinen <aaro.koskinen@nokia.com> | 2011-03-18 19:53:20 -0400 |
---|---|---|
committer | Tony Lindgren <tony@atomide.com> | 2011-03-18 19:53:20 -0400 |
commit | 18a81019b851dae83f7df3e72064de706788ff25 (patch) | |
tree | 8693dabf854cbdf50c8330e3b862cecc9b4dc5ef /arch/arm | |
parent | 36133869c4b5b70e6acf6ff7ce25df526a6d5cae (diff) |
arm: mach-omap2: omap_l3_smx: fix irq handler setup
The handler function may be called from the point it is registered.
Since the handler inspects IRQ numbers, we must set them up before
registration.
Signed-off-by: Aaro Koskinen <aaro.koskinen@nokia.com>
Acked-by: Santosh Shilimkar <santosh.shilimkar@ti.com>
Signed-off-by: Tony Lindgren <tony@atomide.com>
Diffstat (limited to 'arch/arm')
-rw-r--r-- | arch/arm/mach-omap2/omap_l3_smx.c | 11 |
1 files changed, 4 insertions, 7 deletions
diff --git a/arch/arm/mach-omap2/omap_l3_smx.c b/arch/arm/mach-omap2/omap_l3_smx.c index 265bff3acb9e..5f2da7565b68 100644 --- a/arch/arm/mach-omap2/omap_l3_smx.c +++ b/arch/arm/mach-omap2/omap_l3_smx.c | |||
@@ -226,7 +226,6 @@ static int __init omap3_l3_probe(struct platform_device *pdev) | |||
226 | struct omap3_l3 *l3; | 226 | struct omap3_l3 *l3; |
227 | struct resource *res; | 227 | struct resource *res; |
228 | int ret; | 228 | int ret; |
229 | int irq; | ||
230 | 229 | ||
231 | l3 = kzalloc(sizeof(*l3), GFP_KERNEL); | 230 | l3 = kzalloc(sizeof(*l3), GFP_KERNEL); |
232 | if (!l3) { | 231 | if (!l3) { |
@@ -249,18 +248,17 @@ static int __init omap3_l3_probe(struct platform_device *pdev) | |||
249 | goto err2; | 248 | goto err2; |
250 | } | 249 | } |
251 | 250 | ||
252 | irq = platform_get_irq(pdev, 0); | 251 | l3->debug_irq = platform_get_irq(pdev, 0); |
253 | ret = request_irq(irq, omap3_l3_app_irq, | 252 | ret = request_irq(l3->debug_irq, omap3_l3_app_irq, |
254 | IRQF_DISABLED | IRQF_TRIGGER_RISING, | 253 | IRQF_DISABLED | IRQF_TRIGGER_RISING, |
255 | "l3-debug-irq", l3); | 254 | "l3-debug-irq", l3); |
256 | if (ret) { | 255 | if (ret) { |
257 | dev_err(&pdev->dev, "couldn't request debug irq\n"); | 256 | dev_err(&pdev->dev, "couldn't request debug irq\n"); |
258 | goto err3; | 257 | goto err3; |
259 | } | 258 | } |
260 | l3->debug_irq = irq; | ||
261 | 259 | ||
262 | irq = platform_get_irq(pdev, 1); | 260 | l3->app_irq = platform_get_irq(pdev, 1); |
263 | ret = request_irq(irq, omap3_l3_app_irq, | 261 | ret = request_irq(l3->app_irq, omap3_l3_app_irq, |
264 | IRQF_DISABLED | IRQF_TRIGGER_RISING, | 262 | IRQF_DISABLED | IRQF_TRIGGER_RISING, |
265 | "l3-app-irq", l3); | 263 | "l3-app-irq", l3); |
266 | 264 | ||
@@ -269,7 +267,6 @@ static int __init omap3_l3_probe(struct platform_device *pdev) | |||
269 | goto err4; | 267 | goto err4; |
270 | } | 268 | } |
271 | 269 | ||
272 | l3->app_irq = irq; | ||
273 | goto err0; | 270 | goto err0; |
274 | 271 | ||
275 | err4: | 272 | err4: |