au1xxx-ide/rapide: use hwif->index for ide_unregister()

Cc: Russell King <rmk@arm.linux.org.uk>
Signed-off-by: default avatarBartlomiej Zolnierkiewicz <bzolnier@gmail.com>
parent ed908fa1
...@@ -78,8 +78,8 @@ static void __devexit rapide_remove(struct expansion_card *ec) ...@@ -78,8 +78,8 @@ static void __devexit rapide_remove(struct expansion_card *ec)
ecard_set_drvdata(ec, NULL); ecard_set_drvdata(ec, NULL);
/* there must be a better way */ ide_unregister(hwif->index);
ide_unregister(hwif - ide_hwifs);
ecard_release_resources(ec); ecard_release_resources(ec);
} }
......
...@@ -691,7 +691,7 @@ static int au_ide_remove(struct device *dev) ...@@ -691,7 +691,7 @@ static int au_ide_remove(struct device *dev)
ide_hwif_t *hwif = dev_get_drvdata(dev); ide_hwif_t *hwif = dev_get_drvdata(dev);
_auide_hwif *ahwif = &auide_hwif; _auide_hwif *ahwif = &auide_hwif;
ide_unregister(hwif - ide_hwifs); ide_unregister(hwif->index);
iounmap((void *)ahwif->regbase); iounmap((void *)ahwif->regbase);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment