Skip to content

Commit

Permalink
[ARM] pxa/csb701: do not register devices on non-csb726 boads
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Dmitry Eremin-Solenikov authored and Eric Miao committed Apr 4, 2009
1 parent 8a28b10 commit 675b5d8
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions arch/arm/mach-pxa/csb701.c
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,8 @@
#include <linux/input.h>
#include <linux/leds.h>

#include <asm/mach-types.h>

static struct gpio_keys_button csb701_buttons[] = {
{
.code = 0x7,
Expand Down Expand Up @@ -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));
}

Expand Down

0 comments on commit 675b5d8

Please sign in to comment.