summaryrefslogtreecommitdiff
path: root/io-module/mtr2d2.c
diff options
context:
space:
mode:
authorMike Fiore <mfiore@multitech.com>2014-09-23 10:35:11 -0500
committerMike Fiore <mfiore@multitech.com>2014-09-23 10:35:11 -0500
commita21c24fa2486e4d4a3b25d0dcbf873ae62fdbcec (patch)
tree6d78da220c6235cd33408acbd22adf9b4038bbc1 /io-module/mtr2d2.c
parent24c012065ca7a764e1e51a9cfc4422d649cd2851 (diff)
downloadmts-io-a21c24fa2486e4d4a3b25d0dcbf873ae62fdbcec.tar.gz
mts-io-a21c24fa2486e4d4a3b25d0dcbf873ae62fdbcec.tar.bz2
mts-io-a21c24fa2486e4d4a3b25d0dcbf873ae62fdbcec.zip
mts-io: clean up accessory card support
use custom kernel config option MTS_NUM_ACCESSORY_PORTS to find out how many slots exist (mostly) dynamically handle any number of accessory cards streamline code to make it easier to add accessory cards in the future
Diffstat (limited to 'io-module/mtr2d2.c')
-rw-r--r--io-module/mtr2d2.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/io-module/mtr2d2.c b/io-module/mtr2d2.c
index 0926952..24a99f3 100644
--- a/io-module/mtr2d2.c
+++ b/io-module/mtr2d2.c
@@ -1,4 +1,3 @@
-
static struct gpio_pin gpio_pins_mtr2d2_0_0[] = {
{
.name = "RADIO_RESET",
@@ -266,7 +265,8 @@ static struct gpio_pin gpio_pins_mtr2d2_0_0[] = {
{ },
};
-static int mtr2d2_platform_attributes_size = 64; // not including NULL at end
+static int mtr2d2_platform_attributes_max_size = 64; // including NULL at end
+static int mtr2d2_platform_attributes_size = 21;
static struct attribute *mtr2d2_platform_attributes[] = {
&dev_attr_vendor_id.attr,
@@ -295,6 +295,8 @@ static struct attribute *mtr2d2_platform_attributes[] = {
&dev_attr_board_temperature.attr,
/* extra space for the accessory card attributes */
+ NULL, // index 21
+ NULL, // index 22
NULL, // index 23
NULL, // index 24
NULL, // index 25
@@ -336,7 +338,6 @@ static struct attribute *mtr2d2_platform_attributes[] = {
NULL, // index 61
NULL, // index 62
NULL, // index 63
- NULL, // index 64
NULL,
};