patch-2.3.13 linux/drivers/block/floppy.c

Next file: linux/drivers/block/genhd.c
Previous file: linux/drivers/block/cpqarray.c
Back to the patch index
Back to the overall index

diff -u --recursive --new-file v2.3.12/linux/drivers/block/floppy.c linux/drivers/block/floppy.c
@@ -330,7 +330,6 @@
 
 #define SEL_DLY (2*HZ/100)
 
-#define ARRAY_SIZE(x) (sizeof(x) / sizeof((x)[0]))
 /*
  * this struct defines the different floppy drive types.
  */
@@ -4063,10 +4062,13 @@
 	{ "L40SX", 0, &print_unex, 0, 0 } };
 
 #define FLOPPY_SETUP
-void __init floppy_setup(char *str, int *ints)
+void __init floppy_setup(char *str)
 {
 	int i;
 	int param;
+	int ints[11];
+
+	str = get_options(str,ARRAY_SIZE(ints),ints);
 	if (str) {
 		for (i=0; i< ARRAY_SIZE(config_params); i++){
 			if (strcmp(str,config_params[i].name) == 0){
@@ -4358,8 +4360,6 @@
 
 #ifdef MODULE
 
-extern char *get_options(char *str, int *ints);
-
 char *floppy=NULL;
 
 static void __init parse_floppy_cfg_string(char *cfg)
@@ -4374,18 +4374,17 @@
 			cfg++;
 		}
 		if(*ptr)
-			floppy_setup(get_options(ptr,ints),ints);
+			floppy_setup(ptr);
 	}
 }
 
-static void __init mod_setup(char *pattern, void (*setup)(char *, int *))
+static void __init mod_setup(char *pattern, void (*setup)(char *))
 {
 	unsigned long i;
 	char c;
 	int j;
 	int match;
 	char buffer[100];
-	int ints[11];
 	int length = strlen(pattern)+1;
 
 	match=0;
@@ -4400,7 +4399,7 @@
 			if (!c || c == ' ' || c == '\t'){
 				if (j){
 					buffer[j] = '\0';
-					setup(get_options(buffer,ints),ints);
+					setup(buffer);
 				}
 				j=0;
 			} else

FUNET's LINUX-ADM group, linux-adm@nic.funet.fi
TCL-scripts by Sam Shen (who was at: slshen@lbl.gov)