Skip to content

Commit

Permalink
staging: dgap: cleanup duplicated warning message on dgap_tty_init()
Browse files Browse the repository at this point in the history
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 <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>
  • Loading branch information
daeseokyoun authored and gregkh committed Aug 16, 2014
1 parent 274d8b3 commit 35edf11
Showing 1 changed file with 6 additions and 11 deletions.
17 changes: 6 additions & 11 deletions drivers/staging/dgap/dgap.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;

Expand Down

0 comments on commit 35edf11

Please sign in to comment.