diff options
author | Ralf Baechle <ralf@linux-mips.org> | 2000-07-08 02:59:00 +0000 |
---|---|---|
committer | Ralf Baechle <ralf@linux-mips.org> | 2000-07-08 02:59:00 +0000 |
commit | 1fcb7623bc138d780101d7a70cfe29b11f7c67ef (patch) | |
tree | e1ec9bb6aa19db16a405fb4393e2a90c38b4c75d /drivers/ide | |
parent | 458fe58677afb17219d864e100131728038b4f1b (diff) |
Merge with Linux 2.4.0-test3-pre5. 64-bit kernel are still not
-Werror clean.
Diffstat (limited to 'drivers/ide')
-rw-r--r-- | drivers/ide/ide-cs.c | 2 | ||||
-rw-r--r-- | drivers/ide/ide.c | 45 |
2 files changed, 22 insertions, 25 deletions
diff --git a/drivers/ide/ide-cs.c b/drivers/ide/ide-cs.c index 70da1321a..a7619eb8d 100644 --- a/drivers/ide/ide-cs.c +++ b/drivers/ide/ide-cs.c @@ -233,7 +233,7 @@ void ide_config(dev_link_t *link) config_info_t conf; cistpl_cftable_entry_t *cfg = &parse.cftable_entry; cistpl_cftable_entry_t dflt = { 0 }; - int i, pass, last_ret, last_fn, hd, io_base, ctl_base; + int i, pass, last_ret, last_fn, hd=-1, io_base, ctl_base; DEBUG(0, "ide_config(0x%p)\n", link); diff --git a/drivers/ide/ide.c b/drivers/ide/ide.c index c9c3cb120..43838c6dd 100644 --- a/drivers/ide/ide.c +++ b/drivers/ide/ide.c @@ -2858,6 +2858,15 @@ int __init ide_setup (char *s) const char max_drive = 'a' + ((MAX_HWIFS * MAX_DRIVES) - 1); const char max_hwif = '0' + (MAX_HWIFS - 1); + if (strncmp(s,"ide",3) && + strncmp(s,"idebus",6) && +#ifdef CONFIG_BLK_DEV_VIA82CXXX + strncmp(s,"splitfifo",9) && +#endif /* CONFIG_BLK_DEV_VIA82CXXX */ + strncmp(s,"hdxlun",6) && + (strncmp(s,"hd",2) && s[2] != '=')) + return 0; + printk("ide_setup: %s", s); init_ide_data (); @@ -2867,7 +2876,7 @@ int __init ide_setup (char *s) printk(" : Enabled support for IDE doublers\n"); ide_doubler = 1; - return 0; + return 1; } #endif /* CONFIG_BLK_DEV_IDEDOUBLER */ @@ -2875,7 +2884,7 @@ int __init ide_setup (char *s) if (!strcmp(s, "ide=reverse")) { ide_scan_direction = 1; printk(" : Enabled support for IDE inverse scan order.\n"); - return 0; + return 1; } #endif /* CONFIG_BLK_DEV_IDEPCI */ @@ -3188,17 +3197,17 @@ int __init ide_setup (char *s) case 0: goto bad_option; default: printk(" -- SUPPORT NOT CONFIGURED IN THIS KERNEL\n"); - return 0; + return 1; } } bad_option: printk(" -- BAD OPTION\n"); - return 0; + return 1; bad_hwif: printk("-- NOT SUPPORTED ON ide%d", hw); done: printk("\n"); - return 0; + return 1; } /* @@ -3614,6 +3623,10 @@ int __init ide_init (void) return 0; } +#ifdef MODULE +char *options = NULL; +MODULE_PARM(options,"s"); + static void __init parse_options (char *line) { char *next = line; @@ -3623,21 +3636,11 @@ static void __init parse_options (char *line) while ((line = next) != NULL) { if ((next = strchr(line,' ')) != NULL) *next++ = 0; - if (!strncmp(line,"ide",3) || - !strncmp(line,"idebus",6) || -#ifdef CONFIG_BLK_DEV_VIA82CXXX - !strncmp(line,"splitfifo",9) || -#endif /* CONFIG_BLK_DEV_VIA82CXXX */ - !strncmp(line,"hdxlun",6) || - (!strncmp(line,"hd",2) && line[2] != '=')) - (void) ide_setup(line); + if (!ide_setup(line)) + printk ("Unknown option '%s'\n", line); } } -#ifdef MODULE -char *options = NULL; -MODULE_PARM(options,"s"); - int init_module (void) { parse_options(options); @@ -3664,12 +3667,6 @@ void cleanup_module (void) #else /* !MODULE */ -static int parse_ide_setup (char *line) -{ - parse_options(line); - /* We MUST return 0 as otherwise no subsequent __setup option works... */ - return 0; -} -__setup("", parse_ide_setup); +__setup("", ide_setup); #endif /* MODULE */ |