From: Bartlomiej Zolnierkiewicz Date: Fri, 1 Feb 2008 22:09:33 +0000 (+0100) Subject: au1xxx-ide/rapide: use hwif->index for ide_unregister() X-Git-Tag: v2.6.25-rc1~1078^2~20 X-Git-Url: https://err.no/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=fadd11c71b5a100fb7560b84a6272b8883082726;p=linux-2.6 au1xxx-ide/rapide: use hwif->index for ide_unregister() Cc: Russell King Signed-off-by: Bartlomiej Zolnierkiewicz --- diff --git a/drivers/ide/arm/rapide.c b/drivers/ide/arm/rapide.c index e6b56d1d48..b5b6ed8b82 100644 --- a/drivers/ide/arm/rapide.c +++ b/drivers/ide/arm/rapide.c @@ -78,8 +78,8 @@ static void __devexit rapide_remove(struct expansion_card *ec) ecard_set_drvdata(ec, NULL); - /* there must be a better way */ - ide_unregister(hwif - ide_hwifs); + ide_unregister(hwif->index); + ecard_release_resources(ec); } diff --git a/drivers/ide/mips/au1xxx-ide.c b/drivers/ide/mips/au1xxx-ide.c index b00c71f2ae..71782b3828 100644 --- a/drivers/ide/mips/au1xxx-ide.c +++ b/drivers/ide/mips/au1xxx-ide.c @@ -691,7 +691,7 @@ static int au_ide_remove(struct device *dev) ide_hwif_t *hwif = dev_get_drvdata(dev); _auide_hwif *ahwif = &auide_hwif; - ide_unregister(hwif - ide_hwifs); + ide_unregister(hwif->index); iounmap((void *)ahwif->regbase);