aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/ide/pci
diff options
context:
space:
mode:
authorBartlomiej Zolnierkiewicz <bzolnier@gmail.com>2008-07-16 14:33:42 -0400
committerBartlomiej Zolnierkiewicz <bzolnier@gmail.com>2008-07-16 14:33:42 -0400
commiteb3aff5530d22eb4be0a99c9d39c9ffde7b9891a (patch)
treef358ec61f76efb716c90d4788131fda52107eac5 /drivers/ide/pci
parent7b60fa16ca50b0f8cb9d007faee0dff71b397fb8 (diff)
ide: print message on error in ide_find_port_slot()
* Add DRV_NAME define to ide-h8300.c. * Fix ide-h8300.c, swarm.c and sgiioc4.c to set .name field in struct ide_port_info to DRV_NAME, then convert these host drivers to use ide_find_port_slot() instead of ide_find_port(). * Print message on error in ide_find_port_slot(). Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
Diffstat (limited to 'drivers/ide/pci')
-rw-r--r--drivers/ide/pci/scc_pata.c7
-rw-r--r--drivers/ide/pci/sgiioc4.c8
2 files changed, 5 insertions, 10 deletions
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);