From: Russell King Date: Thu, 24 Apr 2008 14:13:36 +0000 (+0100) Subject: [ARM] pxa: don't register lpd270 cpld_irq sysdev if !lpd270 X-Git-Tag: v2.6.27-rc1~1095^2^2~7^3~13 X-Git-Url: http://pilppa.com/gitweb/?a=commitdiff_plain;h=720046de27ec2a96d4497dbca8ee98657efa059c;p=linux-2.6-omap-h63xx.git [ARM] pxa: don't register lpd270 cpld_irq sysdev if !lpd270 Don't register the LPD270 cpld_irq system device when we're not running on a LPD270 machine - "cpld_irq" is also registered (separately) by Lubbock and Mainstone. Signed-off-by: Russell King --- diff --git a/arch/arm/mach-pxa/lpd270.c b/arch/arm/mach-pxa/lpd270.c index a20e4b1649d..6fd7b8b753f 100644 --- a/arch/arm/mach-pxa/lpd270.c +++ b/arch/arm/mach-pxa/lpd270.c @@ -134,9 +134,12 @@ static struct sys_device lpd270_irq_device = { static int __init lpd270_irq_device_init(void) { - int ret = sysdev_class_register(&lpd270_irq_sysclass); - if (ret == 0) - ret = sysdev_register(&lpd270_irq_device); + int ret = -ENODEV; + if (machine_is_logicpd_pxa270()) { + ret = sysdev_class_register(&lpd270_irq_sysclass); + if (ret == 0) + ret = sysdev_register(&lpd270_irq_device); + } return ret; }