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

Signed-off-by: Olli Salonen <olli.salo...@iki.fi>
---
 drivers/media/pci/cx23885/cx23885-dvb.c | 7 +++++++
 drivers/media/pci/cx23885/cx23885.h     | 1 +
 2 files changed, 8 insertions(+)

diff --git a/drivers/media/pci/cx23885/cx23885-dvb.c 
b/drivers/media/pci/cx23885/cx23885-dvb.c
index d327459..cc88997 100644
--- a/drivers/media/pci/cx23885/cx23885-dvb.c
+++ b/drivers/media/pci/cx23885/cx23885-dvb.c
@@ -1923,6 +1923,13 @@ int cx23885_dvb_unregister(struct cx23885_tsport *port)
         * implement MFE support.
         */
 
+       /* 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 1792d1a..c35ba2d 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,
-- 
1.9.1

--
To unsubscribe from this list: send the line "unsubscribe linux-media" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to