summaryrefslogtreecommitdiffstats
path: root/arch/arm/mach-pxa
diff options
context:
space:
mode:
authorRussell King <rmk@dyn-67.arm.linux.org.uk>2008-04-24 15:13:36 +0100
committerRussell King <rmk+kernel@arm.linux.org.uk>2008-06-02 13:49:14 +0100
commit720046de27ec2a96d4497dbca8ee98657efa059c (patch)
tree24d8fc344e16970be7cc4817a09f40c3bbd2ea73 /arch/arm/mach-pxa
parent1a7e612fa5ea0311232bd5418a40ec7280557789 (diff)
downloadlinux-720046de27ec2a96d4497dbca8ee98657efa059c.tar.bz2
[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 <rmk+kernel@arm.linux.org.uk>
Diffstat (limited to 'arch/arm/mach-pxa')
-rw-r--r--arch/arm/mach-pxa/lpd270.c9
1 files changed, 6 insertions, 3 deletions
diff --git a/arch/arm/mach-pxa/lpd270.c b/arch/arm/mach-pxa/lpd270.c
index a20e4b1649d6..6fd7b8b753fc 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;
}