aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/tty/serial/sh-sci.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/tty/serial/sh-sci.c')
-rw-r--r--drivers/tty/serial/sh-sci.c19
1 files changed, 18 insertions, 1 deletions
diff --git a/drivers/tty/serial/sh-sci.c b/drivers/tty/serial/sh-sci.c
index be31d85a50e3..4604153b7954 100644
--- a/drivers/tty/serial/sh-sci.c
+++ b/drivers/tty/serial/sh-sci.c
@@ -1052,9 +1052,17 @@ static int sci_request_irq(struct sci_port *port)
1052 if (SCIx_IRQ_IS_MUXED(port)) { 1052 if (SCIx_IRQ_IS_MUXED(port)) {
1053 i = SCIx_MUX_IRQ; 1053 i = SCIx_MUX_IRQ;
1054 irq = up->irq; 1054 irq = up->irq;
1055 } else 1055 } else {
1056 irq = port->cfg->irqs[i]; 1056 irq = port->cfg->irqs[i];
1057 1057
1058 /*
1059 * Certain port types won't support all of the
1060 * available interrupt sources.
1061 */
1062 if (unlikely(!irq))
1063 continue;
1064 }
1065
1058 desc = sci_irq_desc + i; 1066 desc = sci_irq_desc + i;
1059 port->irqstr[j] = kasprintf(GFP_KERNEL, "%s:%s", 1067 port->irqstr[j] = kasprintf(GFP_KERNEL, "%s:%s",
1060 dev_name(up->dev), desc->desc); 1068 dev_name(up->dev), desc->desc);
@@ -1094,6 +1102,15 @@ static void sci_free_irq(struct sci_port *port)
1094 * IRQ first. 1102 * IRQ first.
1095 */ 1103 */
1096 for (i = 0; i < SCIx_NR_IRQS; i++) { 1104 for (i = 0; i < SCIx_NR_IRQS; i++) {
1105 unsigned int irq = port->cfg->irqs[i];
1106
1107 /*
1108 * Certain port types won't support all of the available
1109 * interrupt sources.
1110 */
1111 if (unlikely(!irq))
1112 continue;
1113
1097 free_irq(port->cfg->irqs[i], port); 1114 free_irq(port->cfg->irqs[i], port);
1098 kfree(port->irqstr[i]); 1115 kfree(port->irqstr[i]);
1099 1116