]> git.karo-electronics.de Git - linux-beck.git/commitdiff
staging: dgap: cleanup duplicated warning message on dgap_tty_init()
authorDaeseok Youn <daeseok.youn@gmail.com>
Sat, 9 Aug 2014 05:37:39 +0000 (14:37 +0900)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Sat, 16 Aug 2014 19:23:05 +0000 (12:23 -0700)
If true_count is not same with brd->nasync, warning messages are
printed. But it has duplicated messages within if statement.

Signed-off-by: Daeseok Youn <daeseok.youn@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/staging/dgap/dgap.c

index b1253c01acce5827bea32efeea209386c5a167c8..51f9ebc9e3ce226d28822a5c09930884c77232d2 100644 (file)
@@ -1374,19 +1374,14 @@ static int dgap_tty_init(struct board_t *brd)
                brd->nasync = brd->maxports;
 
        if (true_count != brd->nasync) {
-               if ((brd->type == PPCM) && (true_count == 64)) {
-                       pr_warn("dgap: %s configured for %d ports, has %d ports.\n",
-                               brd->name, brd->nasync, true_count);
-                       pr_warn("dgap: Please make SURE the EBI cable running from the card\n");
-                       pr_warn("dgap: to each EM module is plugged into EBI IN!\n");
-               } else if ((brd->type == PPCM) && (true_count == 0)) {
-                       pr_warn("dgap: %s configured for %d ports, has %d ports.\n",
-                               brd->name, brd->nasync, true_count);
+               pr_warn("dgap: %s configured for %d ports, has %d ports.\n",
+                       brd->name, brd->nasync, true_count);
+
+               if ((brd->type == PPCM) &&
+                   (true_count == 64 || true_count == 0)) {
                        pr_warn("dgap: Please make SURE the EBI cable running from the card\n");
                        pr_warn("dgap: to each EM module is plugged into EBI IN!\n");
-               } else
-                       pr_warn("dgap: %s configured for %d ports, has %d ports.\n",
-                               brd->name, brd->nasync, true_count);
+               }
 
                brd->nasync = true_count;