aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--drivers/ide/h8300/ide-h8300.c8
-rw-r--r--drivers/ide/ide-probe.c3
-rw-r--r--drivers/ide/mips/swarm.c7
-rw-r--r--drivers/ide/pci/scc_pata.c7
-rw-r--r--drivers/ide/pci/sgiioc4.c8
-rw-r--r--drivers/ide/setup-pci.c5
6 files changed, 16 insertions, 22 deletions
diff --git a/drivers/ide/h8300/ide-h8300.c b/drivers/ide/h8300/ide-h8300.c
index ff6a98afefb7..c445298f7eb8 100644
--- a/drivers/ide/h8300/ide-h8300.c
+++ b/drivers/ide/h8300/ide-h8300.c
@@ -8,6 +8,8 @@
8#include <asm/io.h> 8#include <asm/io.h>
9#include <asm/irq.h> 9#include <asm/irq.h>
10 10
11#define DRV_NAME "ide-h8300"
12
11#define bswap(d) \ 13#define bswap(d) \
12({ \ 14({ \
13 u16 r; \ 15 u16 r; \
@@ -196,11 +198,9 @@ static int __init h8300_ide_init(void)
196 198
197 hw_setup(&hw); 199 hw_setup(&hw);
198 200
199 hwif = ide_find_port(); 201 hwif = ide_find_port_slot(&h8300_port_info);
200 if (hwif == NULL) { 202 if (hwif == NULL)
201 printk(KERN_ERR "ide-h8300: IDE I/F register failed\n");
202 return -ENOENT; 203 return -ENOENT;
203 }
204 204
205 index = hwif->index; 205 index = hwif->index;
206 ide_init_port_hw(hwif, &hw); 206 ide_init_port_hw(hwif, &hw);
diff --git a/drivers/ide/ide-probe.c b/drivers/ide/ide-probe.c
index c5dc18849303..235ebdb29b28 100644
--- a/drivers/ide/ide-probe.c
+++ b/drivers/ide/ide-probe.c
@@ -1490,6 +1490,9 @@ ide_hwif_t *ide_find_port_slot(const struct ide_port_info *d)
1490 } 1490 }
1491 } 1491 }
1492 1492
1493 printk(KERN_ERR "%s: no free slot for interface\n",
1494 d ? d->name : "ide");
1495
1493 return NULL; 1496 return NULL;
1494 1497
1495out_found: 1498out_found:
diff --git a/drivers/ide/mips/swarm.c b/drivers/ide/mips/swarm.c
index 57a0138d0db6..bae92acea343 100644
--- a/drivers/ide/mips/swarm.c
+++ b/drivers/ide/mips/swarm.c
@@ -62,6 +62,7 @@ static struct resource swarm_ide_resource = {
62static struct platform_device *swarm_ide_dev; 62static struct platform_device *swarm_ide_dev;
63 63
64static const struct ide_port_info swarm_port_info = { 64static const struct ide_port_info swarm_port_info = {
65 .name = DRV_NAME,
65 .host_flags = IDE_HFLAG_MMIO | IDE_HFLAG_NO_DMA, 66 .host_flags = IDE_HFLAG_MMIO | IDE_HFLAG_NO_DMA,
66}; 67};
67 68
@@ -81,11 +82,9 @@ static int __devinit swarm_ide_probe(struct device *dev)
81 if (!SIBYTE_HAVE_IDE) 82 if (!SIBYTE_HAVE_IDE)
82 return -ENODEV; 83 return -ENODEV;
83 84
84 hwif = ide_find_port(); 85 hwif = ide_find_port_slot(&swarm_port_info);
85 if (hwif == NULL) { 86 if (hwif == NULL)
86 printk(KERN_ERR DRV_NAME ": no free slot for interface\n");
87 return -ENOMEM; 87 return -ENOMEM;
88 }
89 88
90 base = ioremap(A_IO_EXT_BASE, 0x800); 89 base = ioremap(A_IO_EXT_BASE, 0x800);
91 offset = __raw_readq(base + R_IO_EXT_REG(R_IO_EXT_START_ADDR, IDE_CS)); 90 offset = __raw_readq(base + R_IO_EXT_REG(R_IO_EXT_START_ADDR, IDE_CS));
diff --git a/drivers/ide/pci/scc_pata.c b/drivers/ide/pci/scc_pata.c
index 71bff3131b96..789c66dfbde5 100644
--- a/drivers/ide/pci/scc_pata.c
+++ b/drivers/ide/pci/scc_pata.c
@@ -558,12 +558,9 @@ static int scc_ide_setup_pci_device(struct pci_dev *dev,
558 u8 idx[4] = { 0xff, 0xff, 0xff, 0xff }; 558 u8 idx[4] = { 0xff, 0xff, 0xff, 0xff };
559 int i; 559 int i;
560 560
561 hwif = ide_find_port(); 561 hwif = ide_find_port_slot(d);
562 if (hwif == NULL) { 562 if (hwif == NULL)
563 printk(KERN_ERR "%s: too many IDE interfaces, "
564 "no room in table\n", SCC_PATA_NAME);
565 return -ENOMEM; 563 return -ENOMEM;
566 }
567 564
568 memset(&hw, 0, sizeof(hw)); 565 memset(&hw, 0, sizeof(hw));
569 for (i = 0; i <= 8; i++) 566 for (i = 0; i <= 8; i++)
diff --git a/drivers/ide/pci/sgiioc4.c b/drivers/ide/pci/sgiioc4.c
index dd0d0f73ab16..be73acb2080d 100644
--- a/drivers/ide/pci/sgiioc4.c
+++ b/drivers/ide/pci/sgiioc4.c
@@ -568,6 +568,7 @@ static const struct ide_dma_ops sgiioc4_dma_ops = {
568}; 568};
569 569
570static const struct ide_port_info sgiioc4_port_info __devinitdata = { 570static const struct ide_port_info sgiioc4_port_info __devinitdata = {
571 .name = DRV_NAME,
571 .chipset = ide_pci, 572 .chipset = ide_pci,
572 .init_dma = ide_dma_sgiioc4, 573 .init_dma = ide_dma_sgiioc4,
573 .port_ops = &sgiioc4_port_ops, 574 .port_ops = &sgiioc4_port_ops,
@@ -587,12 +588,9 @@ sgiioc4_ide_setup_pci_device(struct pci_dev *dev)
587 hw_regs_t hw; 588 hw_regs_t hw;
588 struct ide_port_info d = sgiioc4_port_info; 589 struct ide_port_info d = sgiioc4_port_info;
589 590
590 hwif = ide_find_port(); 591 hwif = ide_find_port_slot(&d);
591 if (hwif == NULL) { 592 if (hwif == NULL)
592 printk(KERN_ERR "%s: too many IDE interfaces, no room in table\n",
593 DRV_NAME);
594 return -ENOMEM; 593 return -ENOMEM;
595 }
596 594
597 /* Get the CmdBlk and CtrlBlk Base Registers */ 595 /* Get the CmdBlk and CtrlBlk Base Registers */
598 bar0 = pci_resource_start(dev, 0); 596 bar0 = pci_resource_start(dev, 0);
diff --git a/drivers/ide/setup-pci.c b/drivers/ide/setup-pci.c
index 166211f53f17..4321d20fe874 100644
--- a/drivers/ide/setup-pci.c
+++ b/drivers/ide/setup-pci.c
@@ -332,11 +332,8 @@ static ide_hwif_t *ide_hwif_configure(struct pci_dev *dev,
332 } 332 }
333 333
334 hwif = ide_find_port_slot(d); 334 hwif = ide_find_port_slot(d);
335 if (hwif == NULL) { 335 if (hwif == NULL)
336 printk(KERN_ERR "%s: too many IDE interfaces, no room in "
337 "table\n", d->name);
338 return NULL; 336 return NULL;
339 }
340 337
341 memset(&hw, 0, sizeof(hw)); 338 memset(&hw, 0, sizeof(hw));
342 hw.irq = irq; 339 hw.irq = irq;