From c3c2077d9579472b07581ecdaf6cc5a60b1700bc Mon Sep 17 00:00:00 2001 From: =?utf8?q?Antti=20Sepp=C3=A4l=C3=A4?= Date: Sun, 16 Feb 2014 07:16:02 -0300 Subject: [PATCH] [media] nuvoton-cir: Activate PNP device when probing MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit 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ä Cc: Jarod Wilson Signed-off-by: Mauro Carvalho Chehab --- drivers/media/rc/nuvoton-cir.c | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/drivers/media/rc/nuvoton-cir.c b/drivers/media/rc/nuvoton-cir.c index b41e52e3471a..b81325d7948f 100644 --- a/drivers/media/rc/nuvoton-cir.c +++ b/drivers/media/rc/nuvoton-cir.c @@ -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) { -- 2.11.0