diff options
author | Dmitry Eremin-Solenikov <dbaryshkov@gmail.com> | 2009-03-31 19:40:05 -0400 |
---|---|---|
committer | Eric Miao <eric.miao@marvell.com> | 2009-04-03 22:26:35 -0400 |
commit | 675b5d869fe8f6f9cdb3c6758228f211fb1773e6 (patch) | |
tree | bf8bcec09dae80470ed1effeba2d5445db4818bf /arch/arm/mach-pxa/csb701.c | |
parent | 8a28b10e915fff4a4e8be4f152a8e8695d0cb044 (diff) |
[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 <dbaryshkov@gmail.com>
Signed-off-by: Eric Miao <eric.miao@marvell.com>
Diffstat (limited to 'arch/arm/mach-pxa/csb701.c')
-rw-r--r-- | arch/arm/mach-pxa/csb701.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/arch/arm/mach-pxa/csb701.c b/arch/arm/mach-pxa/csb701.c index 4a2a2952c374..5a221a49ea4d 100644 --- a/arch/arm/mach-pxa/csb701.c +++ b/arch/arm/mach-pxa/csb701.c | |||
@@ -5,6 +5,8 @@ | |||
5 | #include <linux/input.h> | 5 | #include <linux/input.h> |
6 | #include <linux/leds.h> | 6 | #include <linux/leds.h> |
7 | 7 | ||
8 | #include <asm/mach-types.h> | ||
9 | |||
8 | static struct gpio_keys_button csb701_buttons[] = { | 10 | static struct gpio_keys_button csb701_buttons[] = { |
9 | { | 11 | { |
10 | .code = 0x7, | 12 | .code = 0x7, |
@@ -54,6 +56,9 @@ static struct platform_device *devices[] __initdata = { | |||
54 | 56 | ||
55 | static int __init csb701_init(void) | 57 | static int __init csb701_init(void) |
56 | { | 58 | { |
59 | if (!machine_is_csb726()) | ||
60 | return -ENODEV; | ||
61 | |||
57 | return platform_add_devices(devices, ARRAY_SIZE(devices)); | 62 | return platform_add_devices(devices, ARRAY_SIZE(devices)); |
58 | } | 63 | } |
59 | 64 | ||