summaryrefslogtreecommitdiffstats
path: root/drivers
diff options
context:
space:
mode:
authorOlli Salonen2014-09-29 09:44:19 +0200
committerMauro Carvalho Chehab2014-10-30 14:48:39 +0100
commite450de45f4ab9325c8d5d68f3984d6c4d8961d1a (patch)
treefd8d19fc233aa22d43e3662f614a8516711cbd57 /drivers
parent[media] sp2: improve debug logging (diff)
downloadkernel-qcow2-linux-e450de45f4ab9325c8d5d68f3984d6c4d8961d1a.tar.gz
kernel-qcow2-linux-e450de45f4ab9325c8d5d68f3984d6c4d8961d1a.tar.xz
kernel-qcow2-linux-e450de45f4ab9325c8d5d68f3984d6c4d8961d1a.zip
[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: Olli Salonen <olli.salonen@iki.fi> Reviewed-by: Antti Palosaari <crope@iki.fi> Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
Diffstat (limited to 'drivers')
-rw-r--r--drivers/media/pci/cx23885/cx23885-dvb.c7
-rw-r--r--drivers/media/pci/cx23885/cx23885.h1
2 files changed, 8 insertions, 0 deletions
diff --git a/drivers/media/pci/cx23885/cx23885-dvb.c b/drivers/media/pci/cx23885/cx23885-dvb.c
index 062854d30a75..5ea1027878ba 100644
--- a/drivers/media/pci/cx23885/cx23885-dvb.c
+++ b/drivers/media/pci/cx23885/cx23885-dvb.c
@@ -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) {
diff --git a/drivers/media/pci/cx23885/cx23885.h b/drivers/media/pci/cx23885/cx23885.h
index 33b1e26847a2..27ea249d07cf 100644
--- a/drivers/media/pci/cx23885/cx23885.h
+++ b/drivers/media/pci/cx23885/cx23885.h
@@ -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,