PATCH: linux-2.4.1/drivers/md.c unnecessarily referenced unexported symbol name_to_dev_t when md.c is built as module

Adam J. Richter (adam@yggdrasil.com)
Wed, 31 Jan 2001 21:27:23 -0800


--C7zPtVaVf+AK4Oqc
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline

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
adam@yggdrasil.com     \ /                  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."

--C7zPtVaVf+AK4Oqc Content-Type: text/plain; charset=us-ascii Content-Disposition: attachment; filename="md.diff"

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

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