diff options
Diffstat (limited to 'drivers/ide/ide-probe.c')
-rw-r--r-- | drivers/ide/ide-probe.c | 11 |
1 files changed, 5 insertions, 6 deletions
diff --git a/drivers/ide/ide-probe.c b/drivers/ide/ide-probe.c index 34b0d4f26b58..380fa0c8cc84 100644 --- a/drivers/ide/ide-probe.c +++ b/drivers/ide/ide-probe.c | |||
@@ -648,13 +648,12 @@ static int ide_register_port(ide_hwif_t *hwif) | |||
648 | 648 | ||
649 | get_device(&hwif->gendev); | 649 | get_device(&hwif->gendev); |
650 | 650 | ||
651 | hwif->portdev = device_create(ide_port_class, &hwif->gendev, | 651 | hwif->portdev = device_create_drvdata(ide_port_class, &hwif->gendev, |
652 | MKDEV(0, 0), hwif->name); | 652 | MKDEV(0, 0), hwif, hwif->name); |
653 | if (IS_ERR(hwif->portdev)) { | 653 | if (IS_ERR(hwif->portdev)) { |
654 | ret = PTR_ERR(hwif->portdev); | 654 | ret = PTR_ERR(hwif->portdev); |
655 | device_unregister(&hwif->gendev); | 655 | device_unregister(&hwif->gendev); |
656 | } | 656 | } |
657 | dev_set_drvdata(hwif->portdev, hwif); | ||
658 | out: | 657 | out: |
659 | return ret; | 658 | return ret; |
660 | } | 659 | } |
@@ -1334,8 +1333,7 @@ static void ide_port_init_devices(ide_hwif_t *hwif) | |||
1334 | static void ide_init_port(ide_hwif_t *hwif, unsigned int port, | 1333 | static void ide_init_port(ide_hwif_t *hwif, unsigned int port, |
1335 | const struct ide_port_info *d) | 1334 | const struct ide_port_info *d) |
1336 | { | 1335 | { |
1337 | if (d->chipset != ide_etrax100) | 1336 | hwif->channel = port; |
1338 | hwif->channel = port; | ||
1339 | 1337 | ||
1340 | if (d->chipset) | 1338 | if (d->chipset) |
1341 | hwif->chipset = d->chipset; | 1339 | hwif->chipset = d->chipset; |
@@ -1520,7 +1518,7 @@ int ide_device_add_all(u8 *idx, const struct ide_port_info *d) | |||
1520 | continue; | 1518 | continue; |
1521 | } | 1519 | } |
1522 | 1520 | ||
1523 | if (d->chipset != ide_etrax100 && (i & 1) && mate) { | 1521 | if ((i & 1) && mate) { |
1524 | hwif->mate = mate; | 1522 | hwif->mate = mate; |
1525 | mate->mate = hwif; | 1523 | mate->mate = hwif; |
1526 | } | 1524 | } |
@@ -1666,6 +1664,7 @@ static void ide_legacy_init_one(u8 *idx, hw_regs_t *hw, u8 port_no, | |||
1666 | 1664 | ||
1667 | ide_std_init_ports(hw, base, ctl); | 1665 | ide_std_init_ports(hw, base, ctl); |
1668 | hw->irq = irq; | 1666 | hw->irq = irq; |
1667 | hw->chipset = d->chipset; | ||
1669 | 1668 | ||
1670 | hwif = ide_find_port_slot(d); | 1669 | hwif = ide_find_port_slot(d); |
1671 | if (hwif) { | 1670 | if (hwif) { |