[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>
Esse commit está contido em:

commit de
Mauro Carvalho Chehab

pai
97c129747a
commit
0f7499fddb
@@ -265,7 +265,7 @@ static int rc_core_dvb_usb_remote_init(struct dvb_usb_device *d)
|
||||
int err, rc_interval;
|
||||
struct rc_dev *dev;
|
||||
|
||||
dev = rc_allocate_device();
|
||||
dev = rc_allocate_device(d->props.rc.core.driver_type);
|
||||
if (!dev)
|
||||
return -ENOMEM;
|
||||
|
||||
@@ -273,7 +273,6 @@ static int rc_core_dvb_usb_remote_init(struct dvb_usb_device *d)
|
||||
dev->map_name = d->props.rc.core.rc_codes;
|
||||
dev->change_protocol = d->props.rc.core.change_protocol;
|
||||
dev->allowed_protocols = d->props.rc.core.allowed_protos;
|
||||
dev->driver_type = d->props.rc.core.driver_type;
|
||||
usb_to_input_id(d->udev, &dev->input_id);
|
||||
dev->input_name = "IR-receiver inside an USB DVB receiver";
|
||||
dev->input_phys = d->rc_phys;
|
||||
|
Referência em uma nova issue
Block a user