staging: dgap: Simplify get_altpin and get_useintr functions
authorMark Hounschell <markh@compro.net>
Fri, 23 May 2014 17:45:57 +0000 (13:45 -0400)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Fri, 23 May 2014 19:40:52 +0000 (04:40 +0900)
Simplify dgap_config_get_useintr and dgap_config_get_altpin
changing the case statement to an if statement.

Signed-off-by: Mark Hounschell <markh@compro.net>
Tested-by: Mark Hounschell <markh@compro.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/staging/dgap/dgap.c

index f811cbf5332e6df4ddb99eea6781a342d29809db..a89606e1fda97754476f297cdf37c4681791c4a7 100644 (file)
@@ -7310,14 +7310,11 @@ static uint dgap_config_get_useintr(struct board_t *bd)
                return 0;
 
        for (p = bd->bd_config; p; p = p->next) {
-               switch (p->type) {
-               case INTRNODE:
+               if (p->type == INTRNODE) {
                        /*
                         * check for pcxr types.
                         */
                        return p->u.useintr;
-               default:
-                       break;
                }
        }
 
@@ -7336,14 +7333,11 @@ static uint dgap_config_get_altpin(struct board_t *bd)
                return 0;
 
        for (p = bd->bd_config; p; p = p->next) {
-               switch (p->type) {
-               case ANODE:
+               if (p->type == ANODE) {
                        /*
                         * check for pcxr types.
                         */
                        return p->u.altpin;
-               default:
-                       break;
                }
        }