Skip to content

Commit

Permalink
[ARM] pxa: don't register lpd270 cpld_irq sysdev if !lpd270
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Russell King authored and Russell King committed Jun 2, 2008
1 parent 1a7e612 commit 720046d
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions arch/arm/mach-pxa/lpd270.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}

Expand Down

0 comments on commit 720046d

Please sign in to comment.