aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/media
diff options
context:
space:
mode:
authorLuis Henriques <luis.henriques@canonical.com>2012-06-19 10:29:49 -0400
committerMauro Carvalho Chehab <mchehab@redhat.com>2012-07-05 10:14:21 -0400
commitb31b021988fed9e3741a46918f14ba9b063811db (patch)
treee202361087c615b45cb22d3fa6aa15e9c02fd4aa /drivers/media
parent1d432a3d7783b0b86ff08a111b7a4bea550fc4a2 (diff)
[media] ene_ir: Fix driver initialisation
commit 9ef449c6b31bb6a8e6dedc24de475a3b8c79be20 ("[media] rc: Postpone ISR registration") fixed an early ISR registration on several drivers. It did however also introduced a bug by moving the invocation of pnp_port_start() to the end of the probe function. This patch fixes this issue by moving the invocation of pnp_port_start() to an earlier stage in the probe function. Cc: stable@vger.kernel.org Cc: Jarod Wilson <jarod@redhat.com> Signed-off-by: Luis Henriques <luis.henriques@canonical.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Diffstat (limited to 'drivers/media')
-rw-r--r--drivers/media/rc/ene_ir.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/drivers/media/rc/ene_ir.c b/drivers/media/rc/ene_ir.c
index bef5296173c9..647dd951b0e8 100644
--- a/drivers/media/rc/ene_ir.c
+++ b/drivers/media/rc/ene_ir.c
@@ -1018,6 +1018,8 @@ static int ene_probe(struct pnp_dev *pnp_dev, const struct pnp_device_id *id)
1018 1018
1019 spin_lock_init(&dev->hw_lock); 1019 spin_lock_init(&dev->hw_lock);
1020 1020
1021 dev->hw_io = pnp_port_start(pnp_dev, 0);
1022
1021 pnp_set_drvdata(pnp_dev, dev); 1023 pnp_set_drvdata(pnp_dev, dev);
1022 dev->pnp_dev = pnp_dev; 1024 dev->pnp_dev = pnp_dev;
1023 1025
@@ -1072,7 +1074,6 @@ static int ene_probe(struct pnp_dev *pnp_dev, const struct pnp_device_id *id)
1072 1074
1073 /* claim the resources */ 1075 /* claim the resources */
1074 error = -EBUSY; 1076 error = -EBUSY;
1075 dev->hw_io = pnp_port_start(pnp_dev, 0);
1076 if (!request_region(dev->hw_io, ENE_IO_SIZE, ENE_DRIVER_NAME)) { 1077 if (!request_region(dev->hw_io, ENE_IO_SIZE, ENE_DRIVER_NAME)) {
1077 dev->hw_io = -1; 1078 dev->hw_io = -1;
1078 dev->irq = -1; 1079 dev->irq = -1;