md_setup() in linux-2.4.1/drivers/md.c references name_to_kdev_t.
Since name_to_kdev_t is not exported from the kenrel, this causes an
undefined symbol problem when md is built as a module.  However,
md_setup is not used when md is a module.  So, the correct fix
is to make sure that md_setup() is compiled only when md.c
is not a module.  Here is the patch.

-- 
Adam J. Richter     __     ______________   4880 Stevens Creek Blvd, Suite 104
[EMAIL PROTECTED]     \ /                  San Jose, California 95129-1034
+1 408 261-6630         | g g d r a s i l   United States of America
fax +1 408 261-6631      "Free Software For The Rest Of Us."
--- linux-2.4.1/drivers/md/md.c Mon Jan 29 13:16:00 2001
+++ linux/drivers/md/md.c       Wed Jan 31 20:21:36 2001
@@ -3665,6 +3666,7 @@
  *             elements in device-list are read by name_to_kdev_t so can be
  *             a hex number or something like /dev/hda1 /dev/sdb
  */
+#ifndef MODULE
 extern kdev_t name_to_kdev_t(char *line) md__init;
 static int md__init md_setup(char *str)
 {
@@ -3740,6 +3742,7 @@
        md_setup_args.device_set[minor] = 1;
        return 1;
 }
+#endif /* !MODULE */
 
 void md__init md_setup_drive(void)
 {

Reply via email to