Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 1a1934fa authored by James Hogan's avatar James Hogan Committed by Mauro Carvalho Chehab
Browse files

[media] rc: abstract access to allowed/enabled protocols



The allowed and enabled protocol masks need to be expanded to be per
filter type in order to support wakeup filter protocol selection. To
ease that process abstract access to the rc_dev::allowed_protos and
rc_dev::enabled_protocols members with inline functions.

Signed-off-by: default avatarJames Hogan <james.hogan@imgtec.com>
Reviewed-by: default avatarAntti Seppälä <a.seppala@gmail.com>
Signed-off-by: default avatarMauro Carvalho Chehab <m.chehab@samsung.com>
parent b8c7d915
Loading
Loading
Loading
Loading
+1 −1
Original line number Original line Diff line number Diff line
@@ -114,7 +114,7 @@ int picolcd_init_cir(struct picolcd_data *data, struct hid_report *report)


	rdev->priv             = data;
	rdev->priv             = data;
	rdev->driver_type      = RC_DRIVER_IR_RAW;
	rdev->driver_type      = RC_DRIVER_IR_RAW;
	rdev->allowed_protos   = RC_BIT_ALL;
	rc_set_allowed_protocols(rdev, RC_BIT_ALL);
	rdev->open             = picolcd_cir_open;
	rdev->open             = picolcd_cir_open;
	rdev->close            = picolcd_cir_close;
	rdev->close            = picolcd_cir_close;
	rdev->input_name       = data->hdev->name;
	rdev->input_name       = data->hdev->name;
+1 −1
Original line number Original line Diff line number Diff line
@@ -88,7 +88,7 @@ int sms_ir_init(struct smscore_device_t *coredev)


	dev->priv = coredev;
	dev->priv = coredev;
	dev->driver_type = RC_DRIVER_IR_RAW;
	dev->driver_type = RC_DRIVER_IR_RAW;
	dev->allowed_protos = RC_BIT_ALL;
	rc_set_allowed_protocols(dev, RC_BIT_ALL);
	dev->map_name = sms_get_board(board_id)->rc_codes;
	dev->map_name = sms_get_board(board_id)->rc_codes;
	dev->driver_name = MODULE_NAME;
	dev->driver_name = MODULE_NAME;


+2 −2
Original line number Original line Diff line number Diff line
@@ -431,8 +431,8 @@ static int ir_probe(struct i2c_client *client, const struct i2c_device_id *id)
	 * Initialize the other fields of rc_dev
	 * Initialize the other fields of rc_dev
	 */
	 */
	rc->map_name       = ir->ir_codes;
	rc->map_name       = ir->ir_codes;
	rc->allowed_protos = rc_type;
	rc_set_allowed_protocols(rc, rc_type);
	rc->enabled_protocols = rc_type;
	rc_set_enabled_protocols(rc, rc_type);
	if (!rc->driver_name)
	if (!rc->driver_name)
		rc->driver_name = MODULE_NAME;
		rc->driver_name = MODULE_NAME;


+1 −1
Original line number Original line Diff line number Diff line
@@ -346,7 +346,7 @@ int cx23885_input_init(struct cx23885_dev *dev)
	}
	}
	rc->dev.parent = &dev->pci->dev;
	rc->dev.parent = &dev->pci->dev;
	rc->driver_type = driver_type;
	rc->driver_type = driver_type;
	rc->allowed_protos = allowed_protos;
	rc_set_allowed_protocols(rc, allowed_protos);
	rc->priv = kernel_ir;
	rc->priv = kernel_ir;
	rc->open = cx23885_input_ir_open;
	rc->open = cx23885_input_ir_open;
	rc->close = cx23885_input_ir_close;
	rc->close = cx23885_input_ir_close;
+1 −1
Original line number Original line Diff line number Diff line
@@ -469,7 +469,7 @@ int cx88_ir_init(struct cx88_core *core, struct pci_dev *pci)
		dev->timeout = 10 * 1000 * 1000; /* 10 ms */
		dev->timeout = 10 * 1000 * 1000; /* 10 ms */
	} else {
	} else {
		dev->driver_type = RC_DRIVER_SCANCODE;
		dev->driver_type = RC_DRIVER_SCANCODE;
		dev->allowed_protos = rc_type;
		rc_set_allowed_protocols(dev, rc_type);
	}
	}


	ir->core = core;
	ir->core = core;
Loading