Skip to content

Commit

Permalink
ene_ir: Fix driver initialisation
Browse files Browse the repository at this point in the history
commit b31b021 upstream.

commit 9ef449c ("[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: Jarod Wilson <jarod@redhat.com>
Signed-off-by: Luis Henriques <luis.henriques@canonical.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Signed-off-by: Ben Hutchings <ben@decadent.org.uk>
  • Loading branch information
Luis Henriques authored and bwhacks committed Aug 9, 2012
1 parent 1f5d7d0 commit 492ef85
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion drivers/media/rc/ene_ir.c
Expand Up @@ -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;

Expand Down Expand Up @@ -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;
Expand Down

0 comments on commit 492ef85

Please sign in to comment.