diff mbox

[5/7] drivers/atm/eni.c: ensure arguments to request_irq and free_irq are compatible

Message ID 1331494587-12196-6-git-send-email-Julia.Lawall@lip6.fr
State Superseded, archived
Delegated to: David Miller
Headers show

Commit Message

Julia Lawall March 11, 2012, 7:36 p.m. UTC
From: Julia Lawall <Julia.Lawall@lip6.fr>

Convert call to request_irq so that the last argument is the same as the
second argument of the subsequent call to free_irq.  Without this
property, free_irq does nothing.

I have chosen to keep the call to free_irq as is, because its second
argument is more like its first argument.

Signed-off-by: Julia Lawall <Julia.Lawall@lip6.fr>

---
Not tested.  I don't know if I have made the right choice.

 drivers/atm/eni.c |    3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)


--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Comments

chas williams - CONTRACTOR March 11, 2012, 8:58 p.m. UTC | #1
i am pretty sure that request_irq() shouldnt be changed but rather
free_irq() changed.  the last argument of request_irq() is passed to the
interrupt routine (ent_int in this case).  if you change that you need
to update the interrupt routine.  fixing free_irq would be easier.

In message <1331494587-12196-6-git-send-email-Julia.Lawall@lip6.fr>,Julia Lawall writes:
>Convert call to request_irq so that the last argument is the same as the
>second argument of the subsequent call to free_irq.  Without this
>property, free_irq does nothing.
>
>I have chosen to keep the call to free_irq as is, because its second
>argument is more like its first argument.
--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Julia Lawall March 11, 2012, 9:08 p.m. UTC | #2
On Sun, 11 Mar 2012, Chas Williams (CONTRACTOR) wrote:

> i am pretty sure that request_irq() shouldnt be changed but rather
> free_irq() changed.  the last argument of request_irq() is passed to the
> interrupt routine (ent_int in this case).  if you change that you need
> to update the interrupt routine.  fixing free_irq would be easier.

OK, thanks for the feedback.  I will fix it up.

julia

>
> In message <1331494587-12196-6-git-send-email-Julia.Lawall@lip6.fr>,Julia Lawall writes:
>> Convert call to request_irq so that the last argument is the same as the
>> second argument of the subsequent call to free_irq.  Without this
>> property, free_irq does nothing.
>>
>> I have chosen to keep the call to free_irq as is, because its second
>> argument is more like its first argument.
> --
> To unsubscribe from this list: send the line "unsubscribe kernel-janitors" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html
>
--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
diff mbox

Patch

diff --git a/drivers/atm/eni.c b/drivers/atm/eni.c
index 956e9ac..89e7223 100644
--- a/drivers/atm/eni.c
+++ b/drivers/atm/eni.c
@@ -1800,7 +1800,8 @@  static int __devinit eni_start(struct atm_dev *dev)
 
 	DPRINTK(">eni_start\n");
 	eni_dev = ENI_DEV(dev);
-	if (request_irq(eni_dev->irq,&eni_int,IRQF_SHARED,DEV_LABEL,dev)) {
+	if (request_irq(eni_dev->irq, &eni_int, IRQF_SHARED, DEV_LABEL,
+			eni_dev)) {
 		printk(KERN_ERR DEV_LABEL "(itf %d): IRQ%d is already in use\n",
 		    dev->number,eni_dev->irq);
 		error = -EAGAIN;