mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [PATCH] rocketport: make it work when statically linked into kernel
@ 2005-10-24 16:59 Bjorn Helgaas
  2005-10-24 17:47 ` Jiri Slaby
  0 siblings, 1 reply; 3+ messages in thread
From: Bjorn Helgaas @ 2005-10-24 16:59 UTC (permalink / raw)
  To: Andrew Morton; +Cc: linux-kernel, Wolfgang Denk, support

The driver had incorrectly wrapped module_init(rp_init) in #ifdef MODULE,
so it worked only when compiled as a module.

Tested by Wolfgang Denk with this device:

    00:0e.0 Communication controller: Comtrol Corporation RocketPort 8 port w/RJ11 connectors (rev 04)
        Control: I/O+ Mem- BusMaster- SpecCycle- MemWINV- VGASnoop- ParErr- Stepping- SERR- FastB2B-
        Status: Cap- 66Mhz- UDF- FastB2B- ParErr- DEVSEL=slow >TAbort- <TAbort- <MAbort- >SERR- <PERR-
        Interrupt: pin A routed to IRQ 11
        Region 0: I/O ports at 7000 [size=64]

I also added the Comtrol support email address to MAINTAINERS.

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

Index: denk/drivers/char/rocket.c
===================================================================
--- denk.orig/drivers/char/rocket.c	2005-10-24 10:49:03.000000000 -0600
+++ denk/drivers/char/rocket.c	2005-10-24 10:49:04.000000000 -0600
@@ -256,7 +256,6 @@
 static int sReadAiopID(ByteIO_t io);
 static int sReadAiopNumChan(WordIO_t io);
 
-#ifdef MODULE
 MODULE_AUTHOR("Theodore Ts'o");
 MODULE_DESCRIPTION("Comtrol RocketPort driver");
 module_param(board1, ulong, 0);
@@ -288,17 +287,14 @@
 module_param_array(pc104_4, ulong, NULL, 0);
 MODULE_PARM_DESC(pc104_4, "set interface types for ISA(PC104) board #4 (e.g. pc104_4=232,232,485,485,...");
 
-int rp_init(void);
+static int rp_init(void);
 static void rp_cleanup_module(void);
 
 module_init(rp_init);
 module_exit(rp_cleanup_module);
 
-#endif
 
-#ifdef MODULE_LICENSE
 MODULE_LICENSE("Dual BSD/GPL");
-#endif
 
 /*************************************************************************/
 /*                     Module code starts here                           */
@@ -2378,7 +2374,7 @@
 /*
  * The module "startup" routine; it's run when the module is loaded.
  */
-int __init rp_init(void)
+static int __init rp_init(void)
 {
 	int retval, pci_boards_found, isa_boards_found, i;
 
@@ -2502,7 +2498,6 @@
 	return 0;
 }
 
-#ifdef MODULE
 
 static void rp_cleanup_module(void)
 {
@@ -2530,7 +2525,6 @@
 	if (controller)
 		release_region(controller, 4);
 }
-#endif
 
 /***************************************************************************
 Function: sInitController
Index: denk/MAINTAINERS
===================================================================
--- denk.orig/MAINTAINERS	2005-10-24 10:49:03.000000000 -0600
+++ denk/MAINTAINERS	2005-10-24 10:49:04.000000000 -0600
@@ -2041,6 +2041,7 @@
 
 ROCKETPORT DRIVER
 P:	Comtrol Corp.
+M:	support@comtrol.com
 W:	http://www.comtrol.com
 S:	Maintained
 

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

* Re: [PATCH] rocketport: make it work when statically linked into kernel
  2005-10-24 16:59 [PATCH] rocketport: make it work when statically linked into kernel Bjorn Helgaas
@ 2005-10-24 17:47 ` Jiri Slaby
  2005-10-24 18:06   ` Bjorn Helgaas
  0 siblings, 1 reply; 3+ messages in thread
From: Jiri Slaby @ 2005-10-24 17:47 UTC (permalink / raw)
  To: Bjorn Helgaas; +Cc: linux-kernel, Wolfgang Denk, support, Andrew Morton

>The driver had incorrectly wrapped module_init(rp_init) in #ifdef MODULE,
>so it worked only when compiled as a module.
>
[snip]
>
>I also added the Comtrol support email address to MAINTAINERS.
Nope, the e-mail in fact doesn't exist, I (or somebody?) removed it from
MAINTAINERS.
[They'll send you, that you can use web interface as an automatic answer.]

[snip]
>Index: denk/MAINTAINERS
>===================================================================
>--- denk.orig/MAINTAINERS	2005-10-24 10:49:03.000000000 -0600
>+++ denk/MAINTAINERS	2005-10-24 10:49:04.000000000 -0600
>@@ -2041,6 +2041,7 @@
> 
> ROCKETPORT DRIVER
> P:	Comtrol Corp.
>+M:	support@comtrol.com
> W:	http://www.comtrol.com
> S:	Maintained

regards,
--
Jiri Slaby         www.fi.muni.cz/~xslaby
~\-/~      jirislaby@gmail.com      ~\-/~
B67499670407CE62ACC8 22A032CC55C339D47A7E

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

* Re: [PATCH] rocketport: make it work when statically linked into kernel
  2005-10-24 17:47 ` Jiri Slaby
@ 2005-10-24 18:06   ` Bjorn Helgaas
  0 siblings, 0 replies; 3+ messages in thread
From: Bjorn Helgaas @ 2005-10-24 18:06 UTC (permalink / raw)
  To: Jiri Slaby; +Cc: linux-kernel, Wolfgang Denk, support, Andrew Morton

On Monday 24 October 2005 11:47 am, Jiri Slaby wrote:
> >The driver had incorrectly wrapped module_init(rp_init) in #ifdef MODULE,
> >so it worked only when compiled as a module.
> >
> [snip]
> >
> >I also added the Comtrol support email address to MAINTAINERS.
> Nope, the e-mail in fact doesn't exist, I (or somebody?) removed it from
> MAINTAINERS.
> [They'll send you, that you can use web interface as an automatic answer.]

Yeah, you're right.  I got the same automated response to my post,
though the web site still mentions the email address.

I don't think a lame web-only contact should really qualify as
"maintained" though.  Anyway, attached is the same patch without
the MAINTAINERS update.




The driver had incorrectly wrapped module_init(rp_init) in #ifdef MODULE,
so it worked only when compiled as a module.

Tested by Wolfgang Denk with this device:

    00:0e.0 Communication controller: Comtrol Corporation RocketPort 8 port w/RJ11 connectors (rev 04)
        Control: I/O+ Mem- BusMaster- SpecCycle- MemWINV- VGASnoop- ParErr- Stepping- SERR- FastB2B-
        Status: Cap- 66Mhz- UDF- FastB2B- ParErr- DEVSEL=slow >TAbort- <TAbort- <MAbort- >SERR- <PERR-
        Interrupt: pin A routed to IRQ 11
        Region 0: I/O ports at 7000 [size=64]

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

Index: denk/drivers/char/rocket.c
===================================================================
--- denk.orig/drivers/char/rocket.c	2005-10-24 10:49:03.000000000 -0600
+++ denk/drivers/char/rocket.c	2005-10-24 10:49:04.000000000 -0600
@@ -256,7 +256,6 @@
 static int sReadAiopID(ByteIO_t io);
 static int sReadAiopNumChan(WordIO_t io);
 
-#ifdef MODULE
 MODULE_AUTHOR("Theodore Ts'o");
 MODULE_DESCRIPTION("Comtrol RocketPort driver");
 module_param(board1, ulong, 0);
@@ -288,17 +287,14 @@
 module_param_array(pc104_4, ulong, NULL, 0);
 MODULE_PARM_DESC(pc104_4, "set interface types for ISA(PC104) board #4 (e.g. pc104_4=232,232,485,485,...");
 
-int rp_init(void);
+static int rp_init(void);
 static void rp_cleanup_module(void);
 
 module_init(rp_init);
 module_exit(rp_cleanup_module);
 
-#endif
 
-#ifdef MODULE_LICENSE
 MODULE_LICENSE("Dual BSD/GPL");
-#endif
 
 /*************************************************************************/
 /*                     Module code starts here                           */
@@ -2378,7 +2374,7 @@
 /*
  * The module "startup" routine; it's run when the module is loaded.
  */
-int __init rp_init(void)
+static int __init rp_init(void)
 {
 	int retval, pci_boards_found, isa_boards_found, i;
 
@@ -2502,7 +2498,6 @@
 	return 0;
 }
 
-#ifdef MODULE
 
 static void rp_cleanup_module(void)
 {
@@ -2530,7 +2525,6 @@
 	if (controller)
 		release_region(controller, 4);
 }
-#endif
 
 /***************************************************************************
 Function: sInitController

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

end of thread, other threads:[~2005-10-24 18:07 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2005-10-24 16:59 [PATCH] rocketport: make it work when statically linked into kernel Bjorn Helgaas
2005-10-24 17:47 ` Jiri Slaby
2005-10-24 18:06   ` Bjorn Helgaas

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®