PNP: set IRQ index in sysfs "set irq" interface

!MAILaRCHIVE_VOTE_RePLACE
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]
To: Len Brown <lenb@...>
Cc: <linux-acpi@...>, <linux-kernel@...>, Adam Belay <ambx1@...>, Adam M Belay <abelay@...>, Li Shaohua <shaohua.li@...>, Matthieu Castet <castet.matthieu@...>, Thomas Renninger <trenn@...>, Rene Herman <rene.herman@...>, Jaroslav Kysela <perex@...>, Andrew Morton <akpm@...>
Date: Thursday, May 1, 2008 - 5:39 pm

We have to set the ISAPNP register index when setting an IRQ via
the sysfs interface.  We already do it for IO, MEM, and DMA
resources; I just missed the IRQ one.

This needs to be in 2.6.26.

Signed-off-by: Bjorn Helgaas <bjorn.helgaas@hp.com>

Index: work10/drivers/pnp/interface.c
===================================================================
--- work10.orig/drivers/pnp/interface.c	2008-05-01 15:26:28.000000000 -0600
+++ work10/drivers/pnp/interface.c	2008-05-01 15:26:39.000000000 -0600
@@ -424,7 +424,7 @@
 				start = simple_strtoul(buf, &buf, 0);
 				pnp_res = pnp_add_irq_resource(dev, start, 0);
 				if (pnp_res)
-					nirq++;
+					pnp_res->index = nirq++;
 				continue;
 			}
 			if (!strnicmp(buf, "dma", 3)) {
--
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]

Messages in current thread:
PNP: set IRQ index in sysfs "set irq" interface, Bjorn Helgaas, (Thu May 1, 5:39 pm)
Re: PNP: set IRQ index in sysfs "set irq" interface, Rene Herman, (Sun May 4, 9:47 am)
Re: PNP: set IRQ index in sysfs "set irq" interface, Bjorn Helgaas, (Mon May 5, 11:00 am)
Re: PNP: set IRQ index in sysfs "set irq" interface, Thomas Renninger, (Tue May 6, 10:29 am)