From: Alessandro Zummo Date: Wed, 22 Feb 2006 21:12:05 +0000 (+0000) Subject: [ARM] 3342/1: NSLU2: Protect power button init routine with machine_is_nslu2() X-Git-Tag: v2.6.16-rc5~60^2~6 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=d7353b25c855b3a8103647503deaa98f512bd439;p=platform%2Fkernel%2Flinux-3.10.git [ARM] 3342/1: NSLU2: Protect power button init routine with machine_is_nslu2() Patch from Alessandro Zummo The power button exit routine for the Linksys NSLU2 was not protected by a machine_is_nslu2(). This patch fixes it. Signed-off-by: Rod Whitby Signed-off-by: Alessandro Zummo Signed-off-by: Russell King --- diff --git a/arch/arm/mach-ixp4xx/nslu2-power.c b/arch/arm/mach-ixp4xx/nslu2-power.c index b0ad9e9..d80c362 100644 --- a/arch/arm/mach-ixp4xx/nslu2-power.c +++ b/arch/arm/mach-ixp4xx/nslu2-power.c @@ -77,6 +77,9 @@ static int __init nslu2_power_init(void) static void __exit nslu2_power_exit(void) { + if (!(machine_is_nslu2())) + return; + free_irq(NSLU2_RB_IRQ, NULL); free_irq(NSLU2_PB_IRQ, NULL); }