summary refs log tree commit diff
path: root/drivers
diff options
context:
space:
mode:
authorJiri Slaby <jslaby@suse.cz>2021-06-18 08:14:17 +0200
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2021-06-18 13:09:59 +0200
commitcef222cbffccab4ac137b2d4d232103ac9ed8a89 (patch)
treeac1be877375e45560d19ae5c8bb21934e3b5fa9a /drivers
parent928f946426905dd3ab4e166699baa26358cd8a8b (diff)
downloadlinux-cef222cbffccab4ac137b2d4d232103ac9ed8a89.tar.gz
mxser: remove nonsense from ISR
request_irq was passed a board. There is no need to check dev_id and/or
find the appropriate board in the ISR. Neither check if board is NULL.
Remove this nonsense.

Signed-off-by: Jiri Slaby <jslaby@suse.cz>
Link: https://lore.kernel.org/r/20210618061516.662-12-jslaby@suse.cz
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers')
-rw-r--r--drivers/tty/mxser.c13
1 files changed, 1 insertions, 12 deletions
diff --git a/drivers/tty/mxser.c b/drivers/tty/mxser.c
index db594a64ff00..6602b2741271 100644
--- a/drivers/tty/mxser.c
+++ b/drivers/tty/mxser.c
@@ -2207,23 +2207,13 @@ static void mxser_transmit_chars(struct tty_struct *tty, struct mxser_port *port
 static irqreturn_t mxser_interrupt(int irq, void *dev_id)
 {
 	int status, iir, i;
-	struct mxser_board *brd = NULL;
+	struct mxser_board *brd = dev_id;
 	struct mxser_port *port;
 	int max, irqbits, bits, msr;
 	unsigned int int_cnt, pass_counter = 0;
 	int handled = IRQ_NONE;
 	struct tty_struct *tty;
 
-	for (i = 0; i < MXSER_BOARDS; i++)
-		if (dev_id == &mxser_boards[i]) {
-			brd = dev_id;
-			break;
-		}
-
-	if (i == MXSER_BOARDS)
-		goto irq_stop;
-	if (brd == NULL)
-		goto irq_stop;
 	max = brd->info->nports;
 	while (pass_counter++ < MXSER_ISR_PASS_LIMIT) {
 		irqbits = inb(brd->vector) & brd->vector_mask;
@@ -2299,7 +2289,6 @@ static irqreturn_t mxser_interrupt(int irq, void *dev_id)
 		}
 	}
 
-irq_stop:
 	return handled;
 }