[PATCH 2/2] arm: mach-omap2: omap_l3_smx: fix irq handler setup

Santosh Shilimkar santosh.shilimkar at ti.com
Thu Mar 17 01:54:03 EDT 2011


> -----Original Message-----
> From: linux-arm-kernel-bounces at lists.infradead.org [mailto:linux-
> arm-kernel-bounces at lists.infradead.org] On Behalf Of Aaro Koskinen
> Sent: Wednesday, March 16, 2011 10:46 PM
> To: linux-omap at vger.kernel.org; linux-arm-
> kernel at lists.infradead.org; tony at atomide.com
> Cc: Aaro Koskinen
> Subject: [PATCH 2/2] 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.
>
Right. Thanks.

> Signed-off-by: Aaro Koskinen <aaro.koskinen at nokia.com>
> ---

Acked-by: Santosh Shilimkar <santosh.shilimkar at ti.com>

>  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 265bff3..5f2da75 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)
>  	struct omap3_l3         *l3;
>  	struct resource         *res;
>  	int                     ret;
> -	int                     irq;
>
>  	l3 = kzalloc(sizeof(*l3), GFP_KERNEL);
>  	if (!l3) {
> @@ -249,18 +248,17 @@ static int __init omap3_l3_probe(struct
> platform_device *pdev)
>  		goto err2;
>  	}
>
> -	irq = platform_get_irq(pdev, 0);
> -	ret = request_irq(irq, omap3_l3_app_irq,
> +	l3->debug_irq = platform_get_irq(pdev, 0);
> +	ret = request_irq(l3->debug_irq, omap3_l3_app_irq,
>  		IRQF_DISABLED | IRQF_TRIGGER_RISING,
>  		"l3-debug-irq", l3);
>  	if (ret) {
>  		dev_err(&pdev->dev, "couldn't request debug irq\n");
>  		goto err3;
>  	}
> -	l3->debug_irq = irq;
>
> -	irq = platform_get_irq(pdev, 1);
> -	ret = request_irq(irq, omap3_l3_app_irq,
> +	l3->app_irq = platform_get_irq(pdev, 1);
> +	ret = request_irq(l3->app_irq, omap3_l3_app_irq,
>  		IRQF_DISABLED | IRQF_TRIGGER_RISING,
>  		"l3-app-irq", l3);
>
> @@ -269,7 +267,6 @@ static int __init omap3_l3_probe(struct
> platform_device *pdev)
>  		goto err4;
>  	}
>
> -	l3->app_irq = irq;
>  	goto err0;
>
>  err4:
> --
> 1.5.6.5
>
>
> _______________________________________________
> linux-arm-kernel mailing list
> linux-arm-kernel at lists.infradead.org
> http://lists.infradead.org/mailman/listinfo/linux-arm-kernel



More information about the linux-arm-kernel mailing list