]> err.no Git - linux-2.6/commitdiff
au1xxx-ide/rapide: use hwif->index for ide_unregister()
authorBartlomiej Zolnierkiewicz <bzolnier@gmail.com>
Fri, 1 Feb 2008 22:09:33 +0000 (23:09 +0100)
committerBartlomiej Zolnierkiewicz <bzolnier@gmail.com>
Fri, 1 Feb 2008 22:09:33 +0000 (23:09 +0100)
Cc: Russell King <rmk@arm.linux.org.uk>
Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
drivers/ide/arm/rapide.c
drivers/ide/mips/au1xxx-ide.c

index e6b56d1d48f4902ce9f1b0f518c1a5fa4103b563..b5b6ed8b82b211fa0ccdd695e3cebc604e5588ad 100644 (file)
@@ -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);
 }
 
index b00c71f2aee3a8517bdbc97044a2dbe244f926c4..71782b38280ba444e0e275fec7a82146db54a39c 100644 (file)
@@ -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);