diff options
author | Dave Jones <davej@redhat.com> | 2011-02-26 20:31:05 -0500 |
---|---|---|
committer | Dave Jones <davej@redhat.com> | 2011-02-26 20:31:05 -0500 |
commit | edee29af8e388f21ec1f2265186d561418b4ddf2 (patch) | |
tree | fcf10f3d89b19c29dd245f2399450c682a629ad1 | |
parent | eb3916b451bb0b7d163391bc026258d68642ffa6 (diff) |
remove an instance of that horrible macro
-rw-r--r-- | connector.c | 11 |
1 files changed, 10 insertions, 1 deletions
diff --git a/connector.c b/connector.c index e734bc8..613b2eb 100644 --- a/connector.c +++ b/connector.c @@ -53,7 +53,16 @@ static struct { /* natsemi specific (Geode) */ {CONN_BGA, "BGA"}, /* */ }; -get_name(connector, enum connector, connector_strings); + +static const char * get_connector_name(enum connector id) +{ + int i; + + for (i = 0; i < ARRAY_SIZE(connector_strings); i++) + if (id == connector_strings[i].id) + return connector_strings[i].name; + return NULL; +} void decode_connector(enum connector type) { |