Commit 720046de authored by Russell King's avatar Russell King Committed by Russell King

[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: default avatarRussell King <rmk+kernel@arm.linux.org.uk>
parent 1a7e612f
......@@ -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;
}
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment