Skip to contentSkip to conversation

smsc-ircc2: wrap PNP probe code in #ifdef CONFIG_PNP

PATCH Applied [email protected] 2 participants 5 messages May 2, 2008 – May 3, 2008

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 1/2 smsc-ircc2: wrap PNP probe code in #ifdef CONFIG_PNP

From: Bjorn Helgaas <[email protected]>

Wrap PNP probe code in #ifdef CONFIG_PNP.

Without this change, we'll have unresolved references to pnp_get_resource() function when CONFIG_PNP=n. (This is a new interface that's not in mainline yet.)

Cc Stephen Rothwell <[email protected]>
Cc Kamalesh Babulal <[email protected]>
Cc Samuel Ortiz <[email protected]>

---

 drivers/net/irda/smsc-ircc2.c |   14 ++++++++++++--
 1 file changed, 12 insertions(+), 2 deletions(-)
drivers/net/irda/smsc-ircc2.c renamed from drivers/net/irda/smsc-ircc2.c~smsc-ircc2-wrap-pnp-probe-code-in-ifdef-config_pnp +12 -2
diff -puN drivers/net/irda/smsc-ircc2.c~smsc-ircc2-wrap-pnp-probe-code-in-ifdef-config_pnp drivers/net/irda/smsc-ircc2.c
@@ -79,9 +79,13 @@ MODULE_AUTHOR("Daniele Peri <[email protected]
 MODULE_DESCRIPTION("SMC IrCC SIR/FIR controller driver");
 MODULE_LICENSE("GPL");
 
+#ifdef CONFIG_PNP
 static int smsc_nopnp = 1;
 module_param_named(nopnp, smsc_nopnp, bool, 0);
 MODULE_PARM_DESC(nopnp, "Do not use PNP to detect controller settings, defaults to true");
+#else
+#define smsc_nopnp 1
+#endif
 
 #define DMA_INVAL 255
 static int ircc_dma = DMA_INVAL;
@@ -366,6 +370,10 @@ static inline void register_bank(int iob
                iobase + IRCC_MASTER);
 }
 
+static int pnp_driver_registered;
+
+#ifdef CONFIG_PNP
+
 /* PNP hotplug support */
 static const struct pnp_device_id smsc_ircc_pnp_table[] = {
 	{ .id = "SMCf010", .driver_data = 0 },
@@ -374,8 +382,6 @@ static const struct pnp_device_id smsc_i
 };
 MODULE_DEVICE_TABLE(pnp, smsc_ircc_pnp_table);
 
-static int pnp_driver_registered;
-
 static int __init smsc_ircc_pnp_probe(struct pnp_dev *dev,
 				      const struct pnp_device_id *dev_id)
 {
@@ -403,6 +409,10 @@ static struct pnp_driver smsc_ircc_pnp_d
 	.probe		= smsc_ircc_pnp_probe,
 };
 
+#else
+static struct pnp_driver smsc_ircc_pnp_driver;
+#endif
+
 
 /*******************************************************************************
  *

_

#1 lore raw
Quoted 7 lines · On Fri, 02 May 2008 13:40:23 -0700 [email protected] wrote:

From: Bjorn Helgaas <[email protected]>

Wrap PNP probe code in #ifdef CONFIG_PNP.

Without this change, we'll have unresolved references to pnp_get_resource() function when CONFIG_PNP=n. (This is a new interface that's not in mainline yet.)

hrm, it turns out that this is already in linux-next, only I'm not sure by what route it got there.

#2 lore raw

Hi Andrew,

Quoted 6 lines · On Fri, 2 May 2008 14:38:02 -0700 Andrew Morton <[email protected]>…
Quoted 2 lines · On Fri, 02 May 2008 13:40:23 -0700 [email protected] wrote:

From: Bjorn Helgaas <[email protected]>

Quoted 8 lines
Quoted 5 lines

Wrap PNP probe code in #ifdef CONFIG_PNP.

Without this change, we'll have unresolved references to pnp_get_resource() function when CONFIG_PNP=n. (This is a new interface that's not in mainline yet.)

hrm, it turns out that this is already in linux-next, only I'm not sure by what route it got there.

I put it there directly at the end so that the tee would build for various configs. I have been carrying it for some time. I am also carrying a similar patch for nsc-ircc. I will remove them when someone puts them into some other tree that I am merging.

Signature · 3 lines
Cheers,
Stephen Rothwell                    [email protected]
http://www.canb.auug.org.au/~sfr/
#3 lore raw
Quoted 15 lines · On Sat, 3 May 2008 11:46:17 +1000 Stephen Rothwell <[email protected]> wrote:

Hi Andrew,

Quoted 12 lines · On Fri, 2 May 2008 14:38:02 -0700 Andrew Morton <[email protected]>…
Quoted 7 lines · On Fri, 02 May 2008 13:40:23 -0700 [email protected] wrote:

From: Bjorn Helgaas <[email protected]>

Wrap PNP probe code in #ifdef CONFIG_PNP.

Without this change, we'll have unresolved references to pnp_get_resource() function when CONFIG_PNP=n. (This is a new interface that's not in mainline yet.)

Quoted 7 lines
Quoted 2 lines

hrm, it turns out that this is already in linux-next, only I'm not sure by what route it got there.

I put it there directly at the end so that the tee would build for various configs. I have been carrying it for some time. I am also carrying a similar patch for nsc-ircc. I will remove them when someone puts them into some other tree that I am merging.

argh, that's a process problem.

When those patches turn up in linux-next, I will assume that someone merged them into a git tree and I will drop them.

You now own the sole copy. If you drop them, they are lost. If you don't send them to anyone, you own them forever.

So.. what to do about this? I think the only solution is for you to go into akpm mode and start desperately trying to entice someone into merging the patch.

#4 lore raw

Hi Andrew,

Quoted 9 lines · On Fri, 2 May 2008 18:55:11 -0700 Andrew Morton <[email protected]>…
Quoted 4 lines · On Sat, 3 May 2008 11:46:17 +1000 Stephen Rothwell <[email protected]> wrote:

I put it there directly at the end so that the tee would build for various configs. I have been carrying it for some time. I am also carrying a similar patch for nsc-ircc. I will remove them when someone puts them into some other tree that I am merging.

argh, that's a process problem.

Yeah, I guessed it might be :-)

Quoted 9 lines

When those patches turn up in linux-next, I will assume that someone merged them into a git tree and I will drop them.

You now own the sole copy. If you drop them, they are lost. If you don't send them to anyone, you own them forever.

So.. what to do about this? I think the only solution is for you to go into akpm mode and start desperately trying to entice someone into merging the patch.

I can cope with that. There are some patches I need to have so that particular trees/configs will build. It is rare, though. Normally I would revert the problematic patch (and push the problem back on the subsystem/patch owner. When I grabbed those particular patches, I was assuming that it would be a short term thing as all the appropriate people had been notified.

The other turds you will see will be small semi-private fixup patches that I do myself and send back to the appropriate people until they fix their tree - these patches rarely last more than a day and are rolled into the original offending patch or something similar is added to the offending tree.

Signature · 3 lines
Cheers,
Stephen Rothwell                    [email protected]
http://www.canb.auug.org.au/~sfr/