Skip to content

Commit

Permalink
[media] nuvoton-cir: Activate PNP device when probing
Browse files Browse the repository at this point in the history
On certain motherboards (mainly Intel NUC series) bios keeps the
Nuvoton CIR device disabled at boot.

This patch adds a call to kernel PNP layer to activate the device if it
is not already activated. This will improve the chances of the PNP probe
actually succeeding on Intel NUC platforms.

Signed-off-by: Antti Seppälä <a.seppala@gmail.com>
Cc: Jarod Wilson <jarod@redhat.com>
Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
  • Loading branch information
Antti Seppälä authored and Mauro Carvalho Chehab committed Mar 11, 2014
1 parent 7a1dd50 commit c3c2077
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions drivers/media/rc/nuvoton-cir.c
Original file line number Diff line number Diff line change
Expand Up @@ -985,6 +985,12 @@ static int nvt_probe(struct pnp_dev *pdev, const struct pnp_device_id *dev_id)
goto exit_free_dev_rdev;

ret = -ENODEV;
/* activate pnp device */
if (pnp_activate_dev(pdev) < 0) {
dev_err(&pdev->dev, "Could not activate PNP device!\n");
goto exit_free_dev_rdev;
}

/* validate pnp resources */
if (!pnp_port_valid(pdev, 0) ||
pnp_port_len(pdev, 0) < CIR_IOREG_LENGTH) {
Expand Down

0 comments on commit c3c2077

Please sign in to comment.