diff mbox

[2/3,media] winbond-cir: Initialise timeout, driver_type and allowed_protos

Message ID 20120702115852.6c0fe919@kryten (mailing list archive)
State New, archived
Headers show

Commit Message

Anton Blanchard July 2, 2012, 1:58 a.m. UTC
We need to set a timeout so we can go idle on no activity.

We weren't setting driver_type and allowed_protos, so fix that
up too.

Signed-off-by: Anton Blanchard <anton@samba.org>
---

--
To unsubscribe from this list: send the line "unsubscribe linux-media" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Comments

David Härdeman July 3, 2012, 8:22 p.m. UTC | #1
On Mon, Jul 02, 2012 at 11:58:52AM +1000, Anton Blanchard wrote:
>
>We need to set a timeout so we can go idle on no activity.

This change Acked-by: David Härdeman <david@hardeman.nu>

>We weren't setting driver_type and allowed_protos, so fix that
>up too.

driver_type is set in the upstream tree.

allowed_protos isn't used for RC_DRIVER_IR_RAW type drivers (IIRC).

>
>Signed-off-by: Anton Blanchard <anton@samba.org>
>---
>
>Index: linux/drivers/media/rc/winbond-cir.c
>===================================================================
>--- linux.orig/drivers/media/rc/winbond-cir.c	2012-06-18 10:32:54.436717423 +1000
>+++ linux/drivers/media/rc/winbond-cir.c	2012-06-18 10:33:00.192754858 +1000
>@@ -1032,6 +1032,9 @@ wbcir_probe(struct pnp_dev *device, cons
> 	data->dev->tx_ir = wbcir_tx;
> 	data->dev->priv = data;
> 	data->dev->dev.parent = &device->dev;
>+	data->dev->timeout = MS_TO_NS(100);
>+	data->dev->driver_type = RC_DRIVER_IR_RAW;
>+	data->dev->allowed_protos = RC_TYPE_ALL;
> 
> 	if (!request_region(data->wbase, WAKEUP_IOMEM_LEN, DRVNAME)) {
> 		dev_err(dev, "Region 0x%lx-0x%lx already in use!\n",
>

--
To unsubscribe from this list: send the line "unsubscribe linux-media" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
diff mbox

Patch

Index: linux/drivers/media/rc/winbond-cir.c
===================================================================
--- linux.orig/drivers/media/rc/winbond-cir.c	2012-06-18 10:32:54.436717423 +1000
+++ linux/drivers/media/rc/winbond-cir.c	2012-06-18 10:33:00.192754858 +1000
@@ -1032,6 +1032,9 @@  wbcir_probe(struct pnp_dev *device, cons
 	data->dev->tx_ir = wbcir_tx;
 	data->dev->priv = data;
 	data->dev->dev.parent = &device->dev;
+	data->dev->timeout = MS_TO_NS(100);
+	data->dev->driver_type = RC_DRIVER_IR_RAW;
+	data->dev->allowed_protos = RC_TYPE_ALL;
 
 	if (!request_region(data->wbase, WAKEUP_IOMEM_LEN, DRVNAME)) {
 		dev_err(dev, "Region 0x%lx-0x%lx already in use!\n",