From 6106cfc3539eb402da3366d50b810af12b323b26 Mon Sep 17 00:00:00 2001 From: Matt Mackall Date: Tue, 3 Oct 2006 01:14:16 -0700 Subject: [PATCH] --- yaml --- r: 38027 b: refs/heads/master c: 83d7dbc4095a0c314b191c573be5fb4fa6ce0897 h: refs/heads/master i: 38025: e286a5c86f89bde306df61e950acec4921071f17 38023: 1527686db2ce3ad4761b05e3c073bc6ed191195e v: v3 --- [refs] | 2 +- trunk/drivers/ide/Kconfig | 2 +- trunk/drivers/ide/setup-pci.c | 2 +- trunk/include/linux/ide.h | 3 ++- 4 files changed, 5 insertions(+), 4 deletions(-) diff --git a/[refs] b/[refs] index 84e31ec0fd64..19b3cc015c51 100644 --- a/[refs] +++ b/[refs] @@ -1,2 +1,2 @@ --- -refs/heads/master: ce42f19137225d01be9388a73703df40fb7af80f +refs/heads/master: 83d7dbc4095a0c314b191c573be5fb4fa6ce0897 diff --git a/trunk/drivers/ide/Kconfig b/trunk/drivers/ide/Kconfig index 0524f17175fd..abcabb295592 100644 --- a/trunk/drivers/ide/Kconfig +++ b/trunk/drivers/ide/Kconfig @@ -56,7 +56,7 @@ if IDE config IDE_MAX_HWIFS int "Max IDE interfaces" - depends on ALPHA || SUPERH || IA64 + depends on ALPHA || SUPERH || IA64 || EMBEDDED default 4 help This is the maximum number of IDE hardware interfaces that will diff --git a/trunk/drivers/ide/setup-pci.c b/trunk/drivers/ide/setup-pci.c index eb0945284acc..157fe93ea342 100644 --- a/trunk/drivers/ide/setup-pci.c +++ b/trunk/drivers/ide/setup-pci.c @@ -101,7 +101,7 @@ static ide_hwif_t *ide_match_hwif(unsigned long io_base, u8 bootable, const char return hwif; /* pick an unused entry */ } } - for (h = 0; h < 2; ++h) { + for (h = 0; h < 2 && h < MAX_HWIFS; ++h) { hwif = ide_hwifs + h; if (hwif->chipset == ide_unknown) return hwif; /* pick an unused entry */ diff --git a/trunk/include/linux/ide.h b/trunk/include/linux/ide.h index 11608cd03d4c..bdb2733208c5 100644 --- a/trunk/include/linux/ide.h +++ b/trunk/include/linux/ide.h @@ -251,7 +251,8 @@ static inline void ide_std_init_ports(hw_regs_t *hw, #include -#ifndef MAX_HWIFS +#if !defined(MAX_HWIFS) || defined(CONFIG_EMBEDDED) +#undef MAX_HWIFS #define MAX_HWIFS CONFIG_IDE_MAX_HWIFS #endif