summaryrefslogtreecommitdiff
path: root/drivers/ipack/devices/ipoctal.c
diff options
context:
space:
mode:
authorFederico Vaga <federico.vaga@cern.ch>2014-07-03 08:53:58 (GMT)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2014-07-10 00:02:15 (GMT)
commit4847cc073adb91695980906ae557957460fda453 (patch)
tree3bfeca0626b0d401b5634f9cdeff3fa44bf20dde /drivers/ipack/devices/ipoctal.c
parent968d04e8de53789ccdb9f74413eb497f155d266b (diff)
downloadlinux-4847cc073adb91695980906ae557957460fda453.tar.xz
ipoctal: request_irq after configuration
The request for an IRQ handler must be done after whole configuration. This was not the case for this driver which request the IRQ in the middle of the configuration. Sometimes, it happens that something is not completely configured, we recieve an interrupt thus we stumble into troubles in the IRQ handler. Signed-off-by: Federico Vaga <federico.vaga@cern.ch> Acked-by: Samuel Iglesias Gonsalvez <siglesias@igalia.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/ipack/devices/ipoctal.c')
-rw-r--r--drivers/ipack/devices/ipoctal.c15
1 files changed, 8 insertions, 7 deletions
diff --git a/drivers/ipack/devices/ipoctal.c b/drivers/ipack/devices/ipoctal.c
index 69687f1..e41bef0 100644
--- a/drivers/ipack/devices/ipoctal.c
+++ b/drivers/ipack/devices/ipoctal.c
@@ -323,13 +323,6 @@ static int ipoctal_inst_slot(struct ipoctal *ipoctal, unsigned int bus_nr,
&block_regs[i].w.imr);
}
- /*
- * IP-OCTAL has different addresses to copy its IRQ vector.
- * Depending of the carrier these addresses are accesible or not.
- * More info in the datasheet.
- */
- ipoctal->dev->bus->ops->request_irq(ipoctal->dev,
- ipoctal_irq_handler, ipoctal);
/* Dummy write */
iowrite8(1, ipoctal->mem8_space + 1);
@@ -390,6 +383,14 @@ static int ipoctal_inst_slot(struct ipoctal *ipoctal, unsigned int bus_nr,
dev_set_drvdata(tty_dev, channel);
}
+ /*
+ * IP-OCTAL has different addresses to copy its IRQ vector.
+ * Depending of the carrier these addresses are accesible or not.
+ * More info in the datasheet.
+ */
+ ipoctal->dev->bus->ops->request_irq(ipoctal->dev,
+ ipoctal_irq_handler, ipoctal);
+
return 0;
}