[ARM] 3353/1: NAS100d: protect nas100d_power_exit() with machine_is_nas100d()
authorAlessandro Zummo <azummo-armlinux@towertech.it>
Tue, 7 Mar 2006 22:48:29 +0000 (22:48 +0000)
committerRussell King <rmk+kernel@arm.linux.org.uk>
Tue, 7 Mar 2006 22:48:29 +0000 (22:48 +0000)
Patch from Alessandro Zummo

nas100d_power_exit(void) gets some protection
to avoid freeing an irq when it is not appropriate to do so.

Signed-off-by: Rod Whitby <rod@whitby.id.au>
Signed-off-by: Alessandro Zummo <a.zummo@towertech.it>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
arch/arm/mach-ixp4xx/nas100d-power.c

index 2bec69bfa715a2aadffab7cf887466e240988404..99d333d7ebdd56c0d9424a5851efe3baaa55a080 100644 (file)
@@ -56,6 +56,9 @@ static int __init nas100d_power_init(void)
 
 static void __exit nas100d_power_exit(void)
 {
+       if (!(machine_is_nas100d()))
+               return;
+
        free_irq(NAS100D_RB_IRQ, NULL);
 }