aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/ide/ide.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/ide/ide.c')
-rw-r--r--drivers/ide/ide.c5
1 files changed, 2 insertions, 3 deletions
diff --git a/drivers/ide/ide.c b/drivers/ide/ide.c
index 92ab39d5bc25..fbc6d39ace68 100644
--- a/drivers/ide/ide.c
+++ b/drivers/ide/ide.c
@@ -389,9 +389,8 @@ int ide_hwif_request_regions(ide_hwif_t *hwif)
389 unsigned long addr; 389 unsigned long addr;
390 unsigned int i; 390 unsigned int i;
391 391
392 if (hwif->mmio == 2) 392 if (hwif->mmio)
393 return 0; 393 return 0;
394 BUG_ON(hwif->mmio == 1);
395 addr = hwif->io_ports[IDE_CONTROL_OFFSET]; 394 addr = hwif->io_ports[IDE_CONTROL_OFFSET];
396 if (addr && !hwif_request_region(hwif, addr, 1)) 395 if (addr && !hwif_request_region(hwif, addr, 1))
397 goto control_region_busy; 396 goto control_region_busy;
@@ -438,7 +437,7 @@ void ide_hwif_release_regions(ide_hwif_t *hwif)
438{ 437{
439 u32 i = 0; 438 u32 i = 0;
440 439
441 if (hwif->mmio == 2) 440 if (hwif->mmio)
442 return; 441 return;
443 if (hwif->io_ports[IDE_CONTROL_OFFSET]) 442 if (hwif->io_ports[IDE_CONTROL_OFFSET])
444 release_region(hwif->io_ports[IDE_CONTROL_OFFSET], 1); 443 release_region(hwif->io_ports[IDE_CONTROL_OFFSET], 1);