diff options
author | Andi Shyti <andi.shyti@samsung.com> | 2016-12-16 11:50:58 +0300 |
---|---|---|
committer | Mauro Carvalho Chehab <mchehab@s-opensource.com> | 2017-01-30 18:59:57 +0300 |
commit | 0f7499fddb153a333dff3c1dc4280c178b9b5a80 (patch) | |
tree | 23d954a3eeb12d98f0978715d3d10753163a0efe /drivers/media/pci/cx23885 | |
parent | 97c129747af52c23a4dd9c6fc8c73ab8be3b9038 (diff) | |
download | linux-0f7499fddb153a333dff3c1dc4280c178b9b5a80.tar.xz |
[media] rc-main: assign driver type during allocation
The driver type can be assigned immediately when an RC device
requests to the framework to allocate the device.
This is an 'enum rc_driver_type' data type and specifies whether
the device is a raw receiver or scancode receiver. The type will
be given as parameter to the rc_allocate_device device.
Change accordingly all the drivers calling rc_allocate_device()
so that the device type is specified during the rc device
allocation. Whenever the device type is not specified, it will be
set as RC_DRIVER_SCANCODE which was the default '0' value.
Suggested-by: Sean Young <sean@mess.org>
Signed-off-by: Andi Shyti <andi.shyti@samsung.com>
Signed-off-by: Sean Young <sean@mess.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
Diffstat (limited to 'drivers/media/pci/cx23885')
-rw-r--r-- | drivers/media/pci/cx23885/cx23885-input.c | 11 |
1 files changed, 1 insertions, 10 deletions
diff --git a/drivers/media/pci/cx23885/cx23885-input.c b/drivers/media/pci/cx23885/cx23885-input.c index 2d4e703b6893..4367cb3162b6 100644 --- a/drivers/media/pci/cx23885/cx23885-input.c +++ b/drivers/media/pci/cx23885/cx23885-input.c @@ -267,7 +267,6 @@ int cx23885_input_init(struct cx23885_dev *dev) struct cx23885_kernel_ir *kernel_ir; struct rc_dev *rc; char *rc_map; - enum rc_driver_type driver_type; u64 allowed_protos; int ret; @@ -285,28 +284,24 @@ int cx23885_input_init(struct cx23885_dev *dev) case CX23885_BOARD_HAUPPAUGE_HVR1290: case CX23885_BOARD_HAUPPAUGE_HVR1250: /* Integrated CX2388[58] IR controller */ - driver_type = RC_DRIVER_IR_RAW; allowed_protos = RC_BIT_ALL_IR_DECODER; /* The grey Hauppauge RC-5 remote */ rc_map = RC_MAP_HAUPPAUGE; break; case CX23885_BOARD_TERRATEC_CINERGY_T_PCIE_DUAL: /* Integrated CX23885 IR controller */ - driver_type = RC_DRIVER_IR_RAW; allowed_protos = RC_BIT_ALL_IR_DECODER; /* The grey Terratec remote with orange buttons */ rc_map = RC_MAP_NEC_TERRATEC_CINERGY_XS; break; case CX23885_BOARD_TEVII_S470: /* Integrated CX23885 IR controller */ - driver_type = RC_DRIVER_IR_RAW; allowed_protos = RC_BIT_ALL_IR_DECODER; /* A guess at the remote */ rc_map = RC_MAP_TEVII_NEC; break; case CX23885_BOARD_MYGICA_X8507: /* Integrated CX23885 IR controller */ - driver_type = RC_DRIVER_IR_RAW; allowed_protos = RC_BIT_ALL_IR_DECODER; /* A guess at the remote */ rc_map = RC_MAP_TOTAL_MEDIA_IN_HAND_02; @@ -314,7 +309,6 @@ int cx23885_input_init(struct cx23885_dev *dev) case CX23885_BOARD_TBS_6980: case CX23885_BOARD_TBS_6981: /* Integrated CX23885 IR controller */ - driver_type = RC_DRIVER_IR_RAW; allowed_protos = RC_BIT_ALL_IR_DECODER; /* A guess at the remote */ rc_map = RC_MAP_TBS_NEC; @@ -326,13 +320,11 @@ int cx23885_input_init(struct cx23885_dev *dev) case CX23885_BOARD_DVBSKY_S952: case CX23885_BOARD_DVBSKY_T982: /* Integrated CX23885 IR controller */ - driver_type = RC_DRIVER_IR_RAW; allowed_protos = RC_BIT_ALL_IR_DECODER; rc_map = RC_MAP_DVBSKY; break; case CX23885_BOARD_TT_CT2_4500_CI: /* Integrated CX23885 IR controller */ - driver_type = RC_DRIVER_IR_RAW; allowed_protos = RC_BIT_ALL_IR_DECODER; rc_map = RC_MAP_TT_1500; break; @@ -352,7 +344,7 @@ int cx23885_input_init(struct cx23885_dev *dev) pci_name(dev->pci)); /* input device */ - rc = rc_allocate_device(); + rc = rc_allocate_device(RC_DRIVER_IR_RAW); if (!rc) { ret = -ENOMEM; goto err_out_free; @@ -371,7 +363,6 @@ int cx23885_input_init(struct cx23885_dev *dev) rc->input_id.product = dev->pci->device; } rc->dev.parent = &dev->pci->dev; - rc->driver_type = driver_type; rc->allowed_protocols = allowed_protos; rc->priv = kernel_ir; rc->open = cx23885_input_ir_open; |