diff options
author | Bartlomiej Zolnierkiewicz <bzolnier@gmail.com> | 2008-07-16 22:33:42 +0400 |
---|---|---|
committer | Bartlomiej Zolnierkiewicz <bzolnier@gmail.com> | 2008-07-16 22:33:42 +0400 |
commit | eb3aff5530d22eb4be0a99c9d39c9ffde7b9891a (patch) | |
tree | f358ec61f76efb716c90d4788131fda52107eac5 /drivers/ide/pci/sgiioc4.c | |
parent | 7b60fa16ca50b0f8cb9d007faee0dff71b397fb8 (diff) | |
download | linux-eb3aff5530d22eb4be0a99c9d39c9ffde7b9891a.tar.xz |
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/sgiioc4.c')
-rw-r--r-- | drivers/ide/pci/sgiioc4.c | 8 |
1 files changed, 3 insertions, 5 deletions
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 = { }; static const struct ide_port_info sgiioc4_port_info __devinitdata = { + .name = DRV_NAME, .chipset = ide_pci, .init_dma = ide_dma_sgiioc4, .port_ops = &sgiioc4_port_ops, @@ -587,12 +588,9 @@ sgiioc4_ide_setup_pci_device(struct pci_dev *dev) hw_regs_t hw; struct ide_port_info d = sgiioc4_port_info; - hwif = ide_find_port(); - if (hwif == NULL) { - printk(KERN_ERR "%s: too many IDE interfaces, no room in table\n", - DRV_NAME); + hwif = ide_find_port_slot(&d); + if (hwif == NULL) return -ENOMEM; - } /* Get the CmdBlk and CtrlBlk Base Registers */ bar0 = pci_resource_start(dev, 0); |