aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/ide/ide-probe.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/ide/ide-probe.c')
-rw-r--r--drivers/ide/ide-probe.c8
1 files changed, 3 insertions, 5 deletions
diff --git a/drivers/ide/ide-probe.c b/drivers/ide/ide-probe.c
index 655ec7ef568a..d27061b39324 100644
--- a/drivers/ide/ide-probe.c
+++ b/drivers/ide/ide-probe.c
@@ -646,8 +646,6 @@ static int ide_register_port(ide_hwif_t *hwif)
646 goto out; 646 goto out;
647 } 647 }
648 648
649 get_device(&hwif->gendev);
650
651 hwif->portdev = device_create_drvdata(ide_port_class, &hwif->gendev, 649 hwif->portdev = device_create_drvdata(ide_port_class, &hwif->gendev,
652 MKDEV(0, 0), hwif, hwif->name); 650 MKDEV(0, 0), hwif, hwif->name);
653 if (IS_ERR(hwif->portdev)) { 651 if (IS_ERR(hwif->portdev)) {
@@ -1333,8 +1331,7 @@ static void ide_port_init_devices(ide_hwif_t *hwif)
1333static void ide_init_port(ide_hwif_t *hwif, unsigned int port, 1331static void ide_init_port(ide_hwif_t *hwif, unsigned int port,
1334 const struct ide_port_info *d) 1332 const struct ide_port_info *d)
1335{ 1333{
1336 if (d->chipset != ide_etrax100) 1334 hwif->channel = port;
1337 hwif->channel = port;
1338 1335
1339 if (d->chipset) 1336 if (d->chipset)
1340 hwif->chipset = d->chipset; 1337 hwif->chipset = d->chipset;
@@ -1519,7 +1516,7 @@ int ide_device_add_all(u8 *idx, const struct ide_port_info *d)
1519 continue; 1516 continue;
1520 } 1517 }
1521 1518
1522 if (d->chipset != ide_etrax100 && (i & 1) && mate) { 1519 if ((i & 1) && mate) {
1523 hwif->mate = mate; 1520 hwif->mate = mate;
1524 mate->mate = hwif; 1521 mate->mate = hwif;
1525 } 1522 }
@@ -1665,6 +1662,7 @@ static void ide_legacy_init_one(u8 *idx, hw_regs_t *hw, u8 port_no,
1665 1662
1666 ide_std_init_ports(hw, base, ctl); 1663 ide_std_init_ports(hw, base, ctl);
1667 hw->irq = irq; 1664 hw->irq = irq;
1665 hw->chipset = d->chipset;
1668 1666
1669 hwif = ide_find_port_slot(d); 1667 hwif = ide_find_port_slot(d);
1670 if (hwif) { 1668 if (hwif) {