[patch] Re: 2.4.23-pre7: build error with both megaraid drivers enabled

From: Adrian Bunk
Date: Sat Oct 11 2003 - 10:31:52 EST


On Sat, Oct 11, 2003 at 09:48:08AM -0500, Matt Domsch wrote:
> > I get the following build error when trying to compile both megaraid
> > drivers statically into the kernel:
>
> They both drive the same hardware, so this isn't such a good idea. One or
> the other, but not both please, at least not built-in. Both as modules
> should be fine, you'll only ever load one. It's not surprising that a few
> functions are named the same between both.

This should be expressed through the Config.in dependencies, e.g. as
follows:

--- linux-2.4.23-pre7-full/drivers/scsi/Config.in.old 2003-10-11 17:00:47.000000000 +0200
+++ linux-2.4.23-pre7-full/drivers/scsi/Config.in 2003-10-11 17:24:00.000000000 +0200
@@ -67,7 +67,12 @@
dep_tristate 'Always IN2000 SCSI support' CONFIG_SCSI_IN2000 $CONFIG_SCSI
dep_tristate 'AM53/79C974 PCI SCSI support' CONFIG_SCSI_AM53C974 $CONFIG_SCSI $CONFIG_PCI
dep_tristate 'AMI MegaRAID support' CONFIG_SCSI_MEGARAID $CONFIG_SCSI
-dep_tristate 'AMI MegaRAID2 support' CONFIG_SCSI_MEGARAID2 $CONFIG_SCSI
+if [ "$CONFIG_SCSI_MEGARAID" != "y" ]; then
+ define_tristate CONFIG_SCSI_MEGARAID2_DEP $CONFIG_SCSI
+else
+ define_tristate CONFIG_SCSI_MEGARAID2_DEP m $CONFIG_SCSI
+fi
+dep_tristate 'AMI MegaRAID2 support' CONFIG_SCSI_MEGARAID2 $CONFIG_SCSI_MEGARAID2_DEP

dep_tristate 'BusLogic SCSI support' CONFIG_SCSI_BUSLOGIC $CONFIG_SCSI
if [ "$CONFIG_SCSI_BUSLOGIC" != "n" ]; then


> Thanks,
> Matt

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

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/