Skip to content

Commit

Permalink
ide: fix ide_find_port()
Browse files Browse the repository at this point in the history
* 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>
  • Loading branch information
Bartlomiej Zolnierkiewicz committed Apr 17, 2008
1 parent ce9b248 commit 2625cd5
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion drivers/ide/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -36,9 +36,9 @@ ifeq ($(CONFIG_BLK_DEV_CMD640), y)
endif

obj-$(CONFIG_BLK_DEV_IDE) += cris/ ppc/
obj-$(CONFIG_BLK_DEV_IDEPNP) += ide-pnp.o
obj-$(CONFIG_IDE_H8300) += h8300/
obj-$(CONFIG_IDE_GENERIC) += ide-generic.o
obj-$(CONFIG_BLK_DEV_IDEPNP) += ide-pnp.o

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

Expand Down
2 changes: 1 addition & 1 deletion drivers/ide/ide.c
Original file line number Diff line number Diff line change
Expand Up @@ -255,7 +255,7 @@ ide_hwif_t * ide_find_port(unsigned long base)

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

Expand Down

0 comments on commit 2625cd5

Please sign in to comment.