linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH][OBVIOUS] 3c515.c: Enable ISAPNP when built as a module.
@ 2003-12-02  2:40 Matthew Bell
  2003-12-02  3:20 ` Keith Owens
  0 siblings, 1 reply; 3+ messages in thread
From: Matthew Bell @ 2003-12-02  2:40 UTC (permalink / raw)
  To: becker, linux-net, linux-kernel

--- linux-2.4.19.orig/drivers/net/3c515.c       2002-02-25 19:37:59.000000000
+0000
+++ linux-2.4.19/drivers/net/3c515.c    2002-08-03 18:24:05.000000000 +0100
@@ -370,7 +370,7 @@
        { "Default", 0, 0xFF, XCVR_10baseT, 10000},
 };
                                                                                
                                                             
-#ifdef CONFIG_ISAPNP
+#if defined(CONFIG_ISAPNP) || (defined (MODULE) && defined
(CONFIG_ISAPNP_MODULE))
 static struct isapnp_device_id corkscrew_isapnp_adapters[] = {
        {       ISAPNP_ANY_ID, ISAPNP_ANY_ID,
                ISAPNP_VENDOR('T', 'C', 'M'), ISAPNP_FUNCTION(0x5051),
@@ -462,12 +462,12 @@
 {
        int cards_found = 0;
        static int ioaddr;
-#ifdef CONFIG_ISAPNP
+#if defined(CONFIG_ISAPNP) || (defined (MODULE) && defined
(CONFIG_ISAPNP_MODULE))
        short i;
        static int pnp_cards;
 #endif
                                                                                
                                                             
-#ifdef CONFIG_ISAPNP
+#if defined(CONFIG_ISAPNP) || (defined (MODULE) && defined
(CONFIG_ISAPNP_MODULE))
        if(nopnp == 1)
                goto no_pnp;
        for(i=0; corkscrew_isapnp_adapters[i].vendor != 0; i++) {
@@ -530,7 +530,7 @@
        /* Check all locations on the ISA bus -- evil! */
        for (ioaddr = 0x100; ioaddr < 0x400; ioaddr += 0x20) {
                int irq;
-#ifdef CONFIG_ISAPNP
+#if defined(CONFIG_ISAPNP) || (defined (MODULE) && defined
(CONFIG_ISAPNP_MODULE))
                /* Make sure this was not already picked up by isapnp */
                if(ioaddr == corkscrew_isapnp_phys_addr[0]) continue;
                if(ioaddr == corkscrew_isapnp_phys_addr[1]) continue;

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [PATCH][OBVIOUS] 3c515.c: Enable ISAPNP when built as a module.
  2003-12-02  2:40 [PATCH][OBVIOUS] 3c515.c: Enable ISAPNP when built as a module Matthew Bell
@ 2003-12-02  3:20 ` Keith Owens
  2003-12-02 18:01   ` Matthew Bell
  0 siblings, 1 reply; 3+ messages in thread
From: Keith Owens @ 2003-12-02  3:20 UTC (permalink / raw)
  To: Matthew Bell; +Cc: becker, linux-net, linux-kernel

On Tue, 2 Dec 2003 02:40:28 +0000, 
Matthew Bell <m.bell@bvrh.co.uk> wrote:
>--- linux-2.4.19.orig/drivers/net/3c515.c       2002-02-25 19:37:59.000000000
>+0000
>+++ linux-2.4.19/drivers/net/3c515.c    2002-08-03 18:24:05.000000000 +0100
>@@ -370,7 +370,7 @@
>        { "Default", 0, 0xFF, XCVR_10baseT, 10000},
> };
>                                                                                
>                                                             
>-#ifdef CONFIG_ISAPNP
>+#if defined(CONFIG_ISAPNP) || (defined (MODULE) && defined
>(CONFIG_ISAPNP_MODULE))

Your mailer wrapped the lines.

Only test CONFIG_ISAPNP || CONFIG_ISAPNP_MODULE, not MODULE.
CONFIG_foo_MODULE can only be defined when MODULE is defined.

#if defined(CONFIG_ISAPNP) || defined(CONFIG_ISAPNP_MODULE)


^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [PATCH][OBVIOUS] 3c515.c: Enable ISAPNP when built as a module.
  2003-12-02  3:20 ` Keith Owens
@ 2003-12-02 18:01   ` Matthew Bell
  0 siblings, 0 replies; 3+ messages in thread
From: Matthew Bell @ 2003-12-02 18:01 UTC (permalink / raw)
  To: Keith Owens; +Cc: becker, linux-net, linux-kernel

[-- Attachment #1: Type: text/plain, Size: 625 bytes --]

On Tue, 02 Dec 2003 14:20:15 +1100
Keith Owens <kaos@ocs.com.au> wrote:

>Your mailer wrapped the lines.

I include the patch as a plain text attachment this time; I hope as you are not
LT this doens't matter :)
 
> Only test CONFIG_ISAPNP || CONFIG_ISAPNP_MODULE, not MODULE.
> CONFIG_foo_MODULE can only be defined when MODULE is defined.
> 
> #if defined(CONFIG_ISAPNP) || defined(CONFIG_ISAPNP_MODULE)

I don't think so; from a brief look trhough Configure and Makefile, this only
happens when CONFIG_ISAPNP is declared as a dependency of the driver in
question. In this case it is optional so we have to check manually.

[-- Attachment #2: 3c515.diff --]
[-- Type: text/plain, Size: 1325 bytes --]

--- linux-2.4.19.orig/drivers/net/3c515.c	2002-02-25 19:37:59.000000000 +0000
+++ linux-2.4.19/drivers/net/3c515.c	2002-08-03 18:24:05.000000000 +0100
@@ -370,7 +370,7 @@
 	{ "Default", 0, 0xFF, XCVR_10baseT, 10000},
 };
 
-#ifdef CONFIG_ISAPNP
+#if defined(CONFIG_ISAPNP) || (defined (MODULE) && defined (CONFIG_ISAPNP_MODULE))
 static struct isapnp_device_id corkscrew_isapnp_adapters[] = {
 	{	ISAPNP_ANY_ID, ISAPNP_ANY_ID,
 		ISAPNP_VENDOR('T', 'C', 'M'), ISAPNP_FUNCTION(0x5051),
@@ -462,12 +462,12 @@
 {
 	int cards_found = 0;
 	static int ioaddr;
-#ifdef CONFIG_ISAPNP
+#if defined(CONFIG_ISAPNP) || (defined (MODULE) && defined (CONFIG_ISAPNP_MODULE))
 	short i;
 	static int pnp_cards;
 #endif
 
-#ifdef CONFIG_ISAPNP
+#if defined(CONFIG_ISAPNP) || (defined (MODULE) && defined (CONFIG_ISAPNP_MODULE))
 	if(nopnp == 1)
 		goto no_pnp;
 	for(i=0; corkscrew_isapnp_adapters[i].vendor != 0; i++) {
@@ -530,7 +530,7 @@
 	/* Check all locations on the ISA bus -- evil! */
 	for (ioaddr = 0x100; ioaddr < 0x400; ioaddr += 0x20) {
 		int irq;
-#ifdef CONFIG_ISAPNP
+#if defined(CONFIG_ISAPNP) || (defined (MODULE) && defined (CONFIG_ISAPNP_MODULE))
 		/* Make sure this was not already picked up by isapnp */
 		if(ioaddr == corkscrew_isapnp_phys_addr[0]) continue;
 		if(ioaddr == corkscrew_isapnp_phys_addr[1]) continue;

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2003-12-02 18:01 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2003-12-02  2:40 [PATCH][OBVIOUS] 3c515.c: Enable ISAPNP when built as a module Matthew Bell
2003-12-02  3:20 ` Keith Owens
2003-12-02 18:01   ` Matthew Bell

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).