X-Git-Url: http://pilppa.org/gitweb/?a=blobdiff_plain;f=drivers%2Fide%2Fmips%2Fswarm.c;h=badf79fc9e3a1c67c3eef99bbbce4cb9c31eb355;hb=b0e0c9e7f6d5764633e93944dafd896dd6097318;hp=9f1212cc4aed3e33152a1ff0c32eebf62ee0f987;hpb=48ae74443403ab25876959e84785f61bf421ccef;p=linux-2.6-omap-h63xx.git diff --git a/drivers/ide/mips/swarm.c b/drivers/ide/mips/swarm.c index 9f1212cc4ae..badf79fc9e3 100644 --- a/drivers/ide/mips/swarm.c +++ b/drivers/ide/mips/swarm.c @@ -72,12 +72,11 @@ static const struct ide_port_info swarm_port_info = { */ static int __devinit swarm_ide_probe(struct device *dev) { - ide_hwif_t *hwif; u8 __iomem *base; + struct ide_host *host; phys_t offset, size; - hw_regs_t hw; - int i; - u8 idx[] = { 0xff, 0xff, 0xff, 0xff }; + int i, rc; + hw_regs_t hw, *hws[] = { &hw, NULL, NULL, NULL }; if (!SIBYTE_HAVE_IDE) return -ENODEV; @@ -116,26 +115,17 @@ static int __devinit swarm_ide_probe(struct device *dev) hw.irq = K_INT_GB_IDE; hw.chipset = ide_generic; - hwif = ide_find_port_slot(&swarm_port_info); - if (hwif == NULL) + rc = ide_host_add(&swarm_port_info, hws, &host); + if (rc) goto err; - ide_init_port_hw(hwif, &hw); - - /* Setup MMIO ops. */ - default_hwif_mmiops(hwif); - - idx[0] = hwif->index; - - ide_device_add(idx, &swarm_port_info); - - dev_set_drvdata(dev, hwif); + dev_set_drvdata(dev, host); return 0; err: release_resource(&swarm_ide_resource); iounmap(base); - return -ENOMEM; + return rc; } static struct device_driver swarm_ide_driver = {