From: Dmitry Eremin-Solenikov Date: Tue, 31 Mar 2009 23:40:05 +0000 (+0400) Subject: [ARM] pxa/csb701: do not register devices on non-csb726 boads X-Git-Url: https://git.karo-electronics.de/?a=commitdiff_plain;h=675b5d869fe8f6f9cdb3c6758228f211fb1773e6;p=mv-sheeva.git [ARM] pxa/csb701: do not register devices on non-csb726 boads csb701 driver can currently only be used on csb726 boards, limit the csb701 devices registration to csb726 board. Signed-off-by: Dmitry Eremin-Solenikov Signed-off-by: Eric Miao --- diff --git a/arch/arm/mach-pxa/csb701.c b/arch/arm/mach-pxa/csb701.c index 4a2a2952c37..5a221a49ea4 100644 --- a/arch/arm/mach-pxa/csb701.c +++ b/arch/arm/mach-pxa/csb701.c @@ -5,6 +5,8 @@ #include #include +#include + static struct gpio_keys_button csb701_buttons[] = { { .code = 0x7, @@ -54,6 +56,9 @@ static struct platform_device *devices[] __initdata = { static int __init csb701_init(void) { + if (!machine_is_csb726()) + return -ENODEV; + return platform_add_devices(devices, ARRAY_SIZE(devices)); }