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

Commit e450de45 authored by Olli Salonen's avatar Olli Salonen Committed by Mauro Carvalho Chehab
Browse files

[media] cx23885: add I2C client for CI into state and handle unregistering



If the CI chip has an I2C driver, we need to store I2C client into state.

Signed-off-by: default avatarOlli Salonen <olli.salonen@iki.fi>
Reviewed-by: default avatarAntti Palosaari <crope@iki.fi>
Signed-off-by: default avatarMauro Carvalho Chehab <mchehab@osg.samsung.com>
parent b1cb7ad2
Loading
Loading
Loading
Loading
+7 −0
Original line number Diff line number Diff line
@@ -1914,6 +1914,13 @@ int cx23885_dvb_unregister(struct cx23885_tsport *port)
	struct vb2_dvb_frontend *fe0;
	struct i2c_client *client;

	/* remove I2C client for CI */
	client = port->i2c_client_ci;
	if (client) {
		module_put(client->dev.driver->owner);
		i2c_unregister_device(client);
	}

	/* remove I2C client for tuner */
	client = port->i2c_client_tuner;
	if (client) {
+1 −0
Original line number Diff line number Diff line
@@ -297,6 +297,7 @@ struct cx23885_tsport {

	struct i2c_client *i2c_client_demod;
	struct i2c_client *i2c_client_tuner;
	struct i2c_client *i2c_client_ci;

	int (*set_frontend)(struct dvb_frontend *fe);
	int (*fe_set_voltage)(struct dvb_frontend *fe,