From 0f0c9bb72a3be330512e60677c4e3693347bf66b Mon Sep 17 00:00:00 2001
From: Mike Fiore <mfiore@multitech.com>
Date: Wed, 1 Oct 2014 11:11:12 -0500
Subject: mts-io: remove "ap-" from gpiob gpio pin attributes

---
 io-module/mtac_gpiob.c | 22 +++++++++++-----------
 1 file changed, 11 insertions(+), 11 deletions(-)

(limited to 'io-module')

diff --git a/io-module/mtac_gpiob.c b/io-module/mtac_gpiob.c
index ce1d7de..f8652c6 100644
--- a/io-module/mtac_gpiob.c
+++ b/io-module/mtac_gpiob.c
@@ -106,21 +106,21 @@ static int mts_spi_ap_remove(struct spi_device *spi)
 }
 
 static char* gpiob_gpio_pin_name_by_attr_name(const char* name) {
-	if (! strcmp(name, "ap-led1:1")) {
+	if (! strcmp(name, "led1:1")) {
 		return "ap1-gpio3";
-	} else if (! strcmp(name, "ap-led2:1")) {
+	} else if (! strcmp(name, "led2:1")) {
 		return "ap1-gpio4";
-	} else if (! strcmp(name, "ap-dout-enable:1")) {
+	} else if (! strcmp(name, "dout-enable:1")) {
 		return "ap1-gpio1";
-	} else if (! strcmp(name, "ap-reset:1")) {
+	} else if (! strcmp(name, "reset:1")) {
 		return "ap1-reset";
-	} else if (! strcmp(name, "ap-led1:2")) {
+	} else if (! strcmp(name, "led1:2")) {
 		return "ap2-gpio3";
-	} else if (! strcmp(name, "ap-led2:2")) {
+	} else if (! strcmp(name, "led2:2")) {
 		return "ap2-gpio4";
-	} else if (! strcmp(name, "ap-dout-enable:2")) {
+	} else if (! strcmp(name, "dout-enable:2")) {
 		return "ap2-gpio1";
-	} else if (! strcmp(name, "ap-reset:2")) {
+	} else if (! strcmp(name, "reset:2")) {
 		return "ap2-reset";
 	} else {
 		log_error("attirbute name [%s] is invalid for GPIOB", name);
@@ -372,7 +372,7 @@ static bool gpiob_setup(enum ap port) {
 
 	// add LEDs
 	for (i = 1; i <= 2; i++) {
-		sprintf(buf, "ap-led%d:%d", i, port);
+		sprintf(buf, "led%d:%d", i, port);
 		attr = create_attribute(buf, MTS_ATTR_MODE_RW);
 		if (! attr) {
 			log_error("failed to create attribute[%s]", buf);
@@ -390,7 +390,7 @@ static bool gpiob_setup(enum ap port) {
 	}
 
 	// add misc attributes
-	sprintf(buf, "ap-dout-enable:%d", port);
+	sprintf(buf, "dout-enable:%d", port);
 	attr = create_attribute(buf, MTS_ATTR_MODE_RW);
 	if (! attr) {
 		log_error("failed to create attribute[%s]", buf);
@@ -400,7 +400,7 @@ static bool gpiob_setup(enum ap port) {
 	attr->store = mts_attr_store_ap_gpio_pin;
 	device_attrs[device_attrs_size++] = &attr->attr;
 
-	sprintf(buf, "ap-reset:%d", port);
+	sprintf(buf, "reset:%d", port);
 	attr = create_attribute(buf, MTS_ATTR_MODE_RW);
 	if (! attr) {
 		log_error("failed to create attribute[%s]", buf);
-- 
cgit v1.2.3