• Bartlomiej Zolnierkiewicz's avatar
    ide: move hwif_register() call out of ide_probe_port() · a14dc574
    Bartlomiej Zolnierkiewicz authored
    * Add BUG_ON(hwif->present) at the start of ide_probe_port().
    * Move hwif_register() call (along with setting hwif->present) from
      ide_probe_port() to ide_device_add_all().
      As a result the port will be registered with the device tree _after_:
      - probing both devices (if both are present)
      - port reset (if hwif->reset is set)
      - restoring local IRQs state and re-enabling port IRQ
    While at it:
    * Rename hwif_register() to ide_register_port().
    Signed-off-by: default avatarBartlomiej Zolnierkiewicz <bzolnier@gmail.com>
ide-probe.c 33.9 KB