]> git.karo-electronics.de Git - linux-beck.git/commitdiff
[media] ene_ir: Fix driver initialisation
authorLuis Henriques <luis.henriques@canonical.com>
Tue, 19 Jun 2012 14:29:49 +0000 (11:29 -0300)
committerMauro Carvalho Chehab <mchehab@redhat.com>
Thu, 5 Jul 2012 14:14:21 +0000 (11:14 -0300)
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>
drivers/media/rc/ene_ir.c

index bef5296173c904baffc14b8856627839de57f51d..647dd951b0e8c31772e66bcdc333a54c3f839574 100644 (file)
@@ -1018,6 +1018,8 @@ static int ene_probe(struct pnp_dev *pnp_dev, const struct pnp_device_id *id)
 
        spin_lock_init(&dev->hw_lock);
 
+       dev->hw_io = pnp_port_start(pnp_dev, 0);
+
        pnp_set_drvdata(pnp_dev, dev);
        dev->pnp_dev = pnp_dev;
 
@@ -1072,7 +1074,6 @@ static int ene_probe(struct pnp_dev *pnp_dev, const struct pnp_device_id *id)
 
        /* claim the resources */
        error = -EBUSY;
-       dev->hw_io = pnp_port_start(pnp_dev, 0);
        if (!request_region(dev->hw_io, ENE_IO_SIZE, ENE_DRIVER_NAME)) {
                dev->hw_io = -1;
                dev->irq = -1;