Commit 0c24b232 authored by Mark Hounschell's avatar Mark Hounschell Committed by Greg Kroah-Hartman

staging: dgap: Simplify get_altpin and get_useintr functions

Simplify dgap_config_get_useintr and dgap_config_get_altpin
changing the case statement to an if statement.
Signed-off-by: default avatarMark Hounschell <markh@compro.net>
Tested-by: default avatarMark Hounschell <markh@compro.net>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent ee487100
...@@ -7310,14 +7310,11 @@ static uint dgap_config_get_useintr(struct board_t *bd) ...@@ -7310,14 +7310,11 @@ static uint dgap_config_get_useintr(struct board_t *bd)
return 0; return 0;
for (p = bd->bd_config; p; p = p->next) { for (p = bd->bd_config; p; p = p->next) {
switch (p->type) { if (p->type == INTRNODE) {
case INTRNODE:
/* /*
* check for pcxr types. * check for pcxr types.
*/ */
return p->u.useintr; return p->u.useintr;
default:
break;
} }
} }
...@@ -7336,14 +7333,11 @@ static uint dgap_config_get_altpin(struct board_t *bd) ...@@ -7336,14 +7333,11 @@ static uint dgap_config_get_altpin(struct board_t *bd)
return 0; return 0;
for (p = bd->bd_config; p; p = p->next) { for (p = bd->bd_config; p; p = p->next) {
switch (p->type) { if (p->type == ANODE) {
case ANODE:
/* /*
* check for pcxr types. * check for pcxr types.
*/ */
return p->u.altpin; return p->u.altpin;
default:
break;
} }
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment