linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [2.5 patch] allow only one Toshiba Type-O IR Port driver in the kernel
@ 2002-10-20 14:44 Adrian Bunk
  2002-10-21 17:32 ` Jean Tourrilhes
  0 siblings, 1 reply; 5+ messages in thread
From: Adrian Bunk @ 2002-10-20 14:44 UTC (permalink / raw)
  To: Dag Brattli, jt, James McKenzie; +Cc: linux-kernel, trivial


Trying to compile both Toshiba Type-O IR Port drivers into the kernel
fails with the following error:

<--  snip  -->

...
   ld -m elf_i386  -r -o drivers/net/irda/built-in.o ...
drivers/net/irda/donauboe.o: In function `toshoboe_init':
drivers/net/irda/donauboe.o(.init.text+0x0): multiple definition of
`toshoboe_init'
drivers/net/irda/toshoboe.o(.init.text+0x0): first defined here
make[3]: *** [drivers/net/irda/built-in.o] Error 1

<--  snip  -->

The following patch allows the builing of the old driver only when the new
one isn't compiled into the kernel.

Additionally it indents three lines inside an if ... fi that weren't
indented.

--- linux-2.5.44-full/drivers/net/irda/Config.in.old	2002-10-20 14:37:54.000000000 +0200
+++ linux-2.5.44-full/drivers/net/irda/Config.in	2002-10-20 14:44:03.000000000 +0200
@@ -28,12 +28,14 @@
 dep_tristate 'IrDA USB dongles (EXPERIMENTAL)' CONFIG_USB_IRDA $CONFIG_IRDA $CONFIG_USB $CONFIG_EXPERIMENTAL
 dep_tristate 'NSC PC87108/PC87338' CONFIG_NSC_FIR  $CONFIG_IRDA
 dep_tristate 'Winbond W83977AF (IR)' CONFIG_WINBOND_FIR $CONFIG_IRDA
-dep_tristate 'Toshiba Type-O IR Port (old driver)' CONFIG_TOSHIBA_OLD $CONFIG_IRDA
 dep_tristate 'Toshiba Type-O IR Port' CONFIG_TOSHIBA_FIR $CONFIG_IRDA
+if [ "$CONFIG_TOSHIBA_FIR" != "y" ]; then
+   dep_tristate 'Toshiba Type-O IR Port (old driver)' CONFIG_TOSHIBA_OLD $CONFIG_IRDA
+fi
 if [ "$CONFIG_EXPERIMENTAL" != "n" ]; then
-dep_tristate 'SMC IrCC (EXPERIMENTAL)' CONFIG_SMC_IRCC_FIR $CONFIG_IRDA
-dep_tristate 'ALi M5123 FIR (EXPERIMENTAL)' CONFIG_ALI_FIR $CONFIG_IRDA
-dep_tristate 'VLSI 82C147 SIR/MIR/FIR (EXPERIMENTAL)' CONFIG_VLSI_FIR $CONFIG_IRDA
+   dep_tristate 'SMC IrCC (EXPERIMENTAL)' CONFIG_SMC_IRCC_FIR $CONFIG_IRDA
+   dep_tristate 'ALi M5123 FIR (EXPERIMENTAL)' CONFIG_ALI_FIR $CONFIG_IRDA
+   dep_tristate 'VLSI 82C147 SIR/MIR/FIR (EXPERIMENTAL)' CONFIG_VLSI_FIR $CONFIG_IRDA
 fi
 if [ "$CONFIG_ARCH_SA1100" = "y" ]; then
    dep_tristate 'SA1100 Internal IR' CONFIG_SA1100_FIR $CONFIG_IRDA

cu
Adrian

-- 

               "Is there not promise of rain?" Ling Tan asked suddenly out
                of the darkness. There had been need of rain for many days.
               "Only a promise," Lao Er said.
                                               Pearl S. Buck - Dragon Seed




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

* Re: [2.5 patch] allow only one Toshiba Type-O IR Port driver in the kernel
  2002-10-20 14:44 [2.5 patch] allow only one Toshiba Type-O IR Port driver in the kernel Adrian Bunk
@ 2002-10-21 17:32 ` Jean Tourrilhes
  2002-10-29 15:26   ` Adrian Bunk
  0 siblings, 1 reply; 5+ messages in thread
From: Jean Tourrilhes @ 2002-10-21 17:32 UTC (permalink / raw)
  To: Adrian Bunk; +Cc: James McKenzie, linux-kernel, trivial

On Sun, Oct 20, 2002 at 04:44:11PM +0200, Adrian Bunk wrote:
> 
> Trying to compile both Toshiba Type-O IR Port drivers into the kernel
> fails with the following error:
> 
> <--  snip  -->
> 
> ...
>    ld -m elf_i386  -r -o drivers/net/irda/built-in.o ...
> drivers/net/irda/donauboe.o: In function `toshoboe_init':
> drivers/net/irda/donauboe.o(.init.text+0x0): multiple definition of
> `toshoboe_init'
> drivers/net/irda/toshoboe.o(.init.text+0x0): first defined here
> make[3]: *** [drivers/net/irda/built-in.o] Error 1
> 
> <--  snip  -->
> 
> The following patch allows the builing of the old driver only when the new
> one isn't compiled into the kernel.
> 
> Additionally it indents three lines inside an if ... fi that weren't
> indented.

	Adrian,

	Thanks very much for the report. I personally uses modules,
and I would prefer the ability to compile both modules, so that people
can try both without having to recompile their kernel.
	I think a much better patch (and simpler in the long term)
would be to just rename 'toshoboe_init' to 'donauboe_init' (plus the
few other offending function). This is a case where the name doesn't
really matter.
	What do you think ?

	Jean

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

* Re: [2.5 patch] allow only one Toshiba Type-O IR Port driver in the kernel
  2002-10-21 17:32 ` Jean Tourrilhes
@ 2002-10-29 15:26   ` Adrian Bunk
  2002-10-29 17:29     ` Jean Tourrilhes
  0 siblings, 1 reply; 5+ messages in thread
From: Adrian Bunk @ 2002-10-29 15:26 UTC (permalink / raw)
  To: jt; +Cc: James McKenzie, linux-kernel, trivial

On Mon, 21 Oct 2002, Jean Tourrilhes wrote:

> 	Adrian,

Hi Jean,

> 	Thanks very much for the report. I personally uses modules,
> and I would prefer the ability to compile both modules, so that people
> can try both without having to recompile their kernel.

notice that my patch doesn't disallow to build both drivers as modules.

> 	I think a much better patch (and simpler in the long term)
> would be to just rename 'toshoboe_init' to 'donauboe_init' (plus the
> few other offending function). This is a case where the name doesn't
> really matter.
> 	What do you think ?

That's an alternate solution that should also fix the compile problem.

But as stated above my patch doesn't affect the case when both drivers are
modular which is usually the desired setup when you want to switch between
the two drivers.

> 	Jean

cu
Adrian

-- 

       "Is there not promise of rain?" Ling Tan asked suddenly out
        of the darkness. There had been need of rain for many days.
       "Only a promise," Lao Er said.
                                       Pearl S. Buck - Dragon Seed









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

* Re: [2.5 patch] allow only one Toshiba Type-O IR Port driver in the kernel
  2002-10-29 15:26   ` Adrian Bunk
@ 2002-10-29 17:29     ` Jean Tourrilhes
  2002-10-30 12:14       ` Adrian Bunk
  0 siblings, 1 reply; 5+ messages in thread
From: Jean Tourrilhes @ 2002-10-29 17:29 UTC (permalink / raw)
  To: Adrian Bunk; +Cc: James McKenzie, linux-kernel, trivial

On Tue, Oct 29, 2002 at 04:26:50PM +0100, Adrian Bunk wrote:
> On Mon, 21 Oct 2002, Jean Tourrilhes wrote:
> 
> > 	Adrian,
> 
> Hi Jean,
> 
> > 	Thanks very much for the report. I personally uses modules,
> > and I would prefer the ability to compile both modules, so that people
> > can try both without having to recompile their kernel.
> 
> notice that my patch doesn't disallow to build both drivers as modules.
> 
> > 	I think a much better patch (and simpler in the long term)
> > would be to just rename 'toshoboe_init' to 'donauboe_init' (plus the
> > few other offending function). This is a case where the name doesn't
> > really matter.
> > 	What do you think ?
> 
> That's an alternate solution that should also fix the compile problem.
> 
> But as stated above my patch doesn't affect the case when both drivers are
> modular which is usually the desired setup when you want to switch between
> the two drivers.

	I personally prefer to make the driver code cleaner rather
than making the config/Makefile rules more complex. I believe that in
the long run, it always pay to keep things simple.
	But, I'm not religious about it.

> cu
> Adrian

	How do we proceed ? Do you want to send patches yourself
directly, or do you want to wait until I send my next IrDA update ?
	Regards,

	Jean


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

* Re: [2.5 patch] allow only one Toshiba Type-O IR Port driver in the kernel
  2002-10-29 17:29     ` Jean Tourrilhes
@ 2002-10-30 12:14       ` Adrian Bunk
  0 siblings, 0 replies; 5+ messages in thread
From: Adrian Bunk @ 2002-10-30 12:14 UTC (permalink / raw)
  To: jt; +Cc: James McKenzie, linux-kernel, trivial

On Tue, 29 Oct 2002, Jean Tourrilhes wrote:

>...
> > But as stated above my patch doesn't affect the case when both drivers are
> > modular which is usually the desired setup when you want to switch between
> > the two drivers.
>
> 	I personally prefer to make the driver code cleaner rather
> than making the config/Makefile rules more complex. I believe that in
> the long run, it always pay to keep things simple.
> 	But, I'm not religious about it.

The only thing I'm religious about is that a kernel with a valid .config
shouldn't produce compile errors.

> 	How do we proceed ? Do you want to send patches yourself
> directly, or do you want to wait until I send my next IrDA update ?

I'll wait until you send the fix you prefer at the next IrDA update.

> 	Regards,
> 	Jean

cu
Adrian

-- 

       "Is there not promise of rain?" Ling Tan asked suddenly out
        of the darkness. There had been need of rain for many days.
       "Only a promise," Lao Er said.
                                       Pearl S. Buck - Dragon Seed



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

end of thread, other threads:[~2002-10-30 12:08 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2002-10-20 14:44 [2.5 patch] allow only one Toshiba Type-O IR Port driver in the kernel Adrian Bunk
2002-10-21 17:32 ` Jean Tourrilhes
2002-10-29 15:26   ` Adrian Bunk
2002-10-29 17:29     ` Jean Tourrilhes
2002-10-30 12:14       ` Adrian Bunk

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).