summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJesse Gilles <jgilles@multitech.com>2013-03-06 12:33:54 -0600
committerJesse Gilles <jgilles@multitech.com>2013-03-06 12:33:54 -0600
commit1502278d3ebd04fcd7ebd1238e31f65fc7a5ff3f (patch)
tree557702509fc0ffa4de417541da3a58af819fe6df
parent3b847c3eeb275330d98283db5362da62765dea3c (diff)
downloadcdp-io-controller-1502278d3ebd04fcd7ebd1238e31f65fc7a5ff3f.tar.gz
cdp-io-controller-1502278d3ebd04fcd7ebd1238e31f65fc7a5ff3f.tar.bz2
cdp-io-controller-1502278d3ebd04fcd7ebd1238e31f65fc7a5ff3f.zip
allow pins with empty attr_name, require name only
-rw-r--r--io-module/mts_io.c7
1 files changed, 1 insertions, 6 deletions
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;
}