Commit 16f159b1 authored by Russell King's avatar Russell King Committed by Russell King

[ARM] pxa: only register "cpld_irq" for the correct platform

Only register the "cpld_irq" sysclass for mainstone/lubbock if we're
running on one of those platforms.
Signed-off-by: default avatarRussell King <rmk+kernel@arm.linux.org.uk>
parent 2f1a74e5
......@@ -136,9 +136,13 @@ static struct sys_device lubbock_irq_device = {
static int __init lubbock_irq_device_init(void)
{
int ret = sysdev_class_register(&lubbock_irq_sysclass);
if (ret == 0)
ret = sysdev_register(&lubbock_irq_device);
int ret = -ENODEV;
if (machine_is_lubbock()) {
ret = sysdev_class_register(&lubbock_irq_sysclass);
if (ret == 0)
ret = sysdev_register(&lubbock_irq_device);
}
return ret;
}
......
......@@ -131,9 +131,13 @@ static struct sys_device mainstone_irq_device = {
static int __init mainstone_irq_device_init(void)
{
int ret = sysdev_class_register(&mainstone_irq_sysclass);
if (ret == 0)
ret = sysdev_register(&mainstone_irq_device);
int ret = -ENODEV;
if (machine_is_mainstone()) {
ret = sysdev_class_register(&mainstone_irq_sysclass);
if (ret == 0)
ret = sysdev_register(&mainstone_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