diff options
author | Bartlomiej Zolnierkiewicz <bzolnier@gmail.com> | 2008-07-16 14:33:42 -0400 |
---|---|---|
committer | Bartlomiej Zolnierkiewicz <bzolnier@gmail.com> | 2008-07-16 14:33:42 -0400 |
commit | eb3aff5530d22eb4be0a99c9d39c9ffde7b9891a (patch) | |
tree | f358ec61f76efb716c90d4788131fda52107eac5 /drivers/ide/mips | |
parent | 7b60fa16ca50b0f8cb9d007faee0dff71b397fb8 (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/mips')
-rw-r--r-- | drivers/ide/mips/swarm.c | 7 |
1 files changed, 3 insertions, 4 deletions
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 = { | |||
62 | static struct platform_device *swarm_ide_dev; | 62 | static struct platform_device *swarm_ide_dev; |
63 | 63 | ||
64 | static const struct ide_port_info swarm_port_info = { | 64 | static 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)); |