Skip to content

Commit 2625cd5

Browse files
committed
ide: fix ide_find_port()
* Instead of checking for '->io_ports[IDE_DATA_OFFSET] == 0' check for '->chipset == ide_unknown' when looking for an empty ide_hwifs[] slot. * Do ide-pnp initialization after ide-generic when IDE is built-in (ide-pnp is the only user of ide_find_port() which needs such fixup). Acked-by: Sergei Shtylyov <sshtylyov@ru.mvista.com> Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
1 parent ce9b248 commit 2625cd5

2 files changed

Lines changed: 2 additions & 2 deletions

File tree

‎drivers/ide/Makefile‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,9 +36,9 @@ ifeq ($(CONFIG_BLK_DEV_CMD640), y)
3636
endif
3737

3838
obj-$(CONFIG_BLK_DEV_IDE) += cris/ ppc/
39-
obj-$(CONFIG_BLK_DEV_IDEPNP) += ide-pnp.o
4039
obj-$(CONFIG_IDE_H8300) += h8300/
4140
obj-$(CONFIG_IDE_GENERIC) += ide-generic.o
41+
obj-$(CONFIG_BLK_DEV_IDEPNP) += ide-pnp.o
4242

4343
ide-cd_mod-y += ide-cd.o ide-cd_ioctl.o ide-cd_verbose.o
4444

‎drivers/ide/ide.c‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -255,7 +255,7 @@ ide_hwif_t * ide_find_port(unsigned long base)
255255

256256
for (i = 0; i < MAX_HWIFS; i++) {
257257
hwif = &ide_hwifs[i];
258-
if (hwif->io_ports[IDE_DATA_OFFSET] == 0)
258+
if (hwif->chipset == ide_unknown)
259259
goto found;
260260
}
261261

0 commit comments

Comments
 (0)