From 1502278d3ebd04fcd7ebd1238e31f65fc7a5ff3f Mon Sep 17 00:00:00 2001 From: Jesse Gilles Date: Wed, 6 Mar 2013 12:33:54 -0600 Subject: allow pins with empty attr_name, require name only --- io-module/mts_io.c | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) (limited to 'io-module') diff --git a/io-module/mts_io.c b/io-module/mts_io.c index ae2764d..3e08f4e 100644 --- a/io-module/mts_io.c +++ b/io-module/mts_io.c @@ -99,7 +99,6 @@ static struct gpio_pin *gpio_pins; static struct gpio_pin gpio_pins_mtcdp_0_0[] = { { .name = "ENIO", - .attr_name = "", .pin = AT91_PIN_PC15, .direction = GPIO_DIR_OUTPUT, .output_value = 1, @@ -177,7 +176,6 @@ static struct gpio_pin gpio_pins_mtcdp_0_0[] = { static struct gpio_pin gpio_pins_mtcdp_1_0[] = { { .name = "ENIO", - .attr_name = "", .pin = AT91_PIN_PC15, .direction = GPIO_DIR_OUTPUT, .output_value = 1, @@ -242,7 +240,6 @@ static struct gpio_pin gpio_pins_mtcdp_1_0[] = { }, { .name = "TXD1", - .attr_name = "", .pin = AT91_PIN_PB17, .direction = GPIO_DIR_INPUT, .output_value = 0, @@ -291,7 +288,6 @@ static struct gpio_pin gpio_pins_mtcdp_1_0[] = { static struct gpio_pin gpio_pins_mt100eocg_0_0[] = { { .name = "ENIO", - .attr_name = "", .pin = AT91_PIN_PC15, .direction = GPIO_DIR_OUTPUT, .output_value = 1, @@ -354,7 +350,6 @@ static struct gpio_pin gpio_pins_mt100eocg_0_0[] = { }, { .name = "TXD1", - .attr_name = "", .pin = AT91_PIN_PB17, .direction = GPIO_DIR_INPUT, .output_value = 0, @@ -801,7 +796,7 @@ struct gpio_pin *gpio_pin_by_name(const char *name) { struct gpio_pin *gpio_pin_by_attr_name(const char *name) { struct gpio_pin *pin; - for (pin = gpio_pins; *pin->attr_name; pin++) { + for (pin = gpio_pins; *pin->name; pin++) { if (!strcmp(pin->attr_name, name)) { return pin; } -- cgit v1.2.3