diff options
author | Matthias Schwarzott <zzam@gentoo.org> | 2016-07-26 09:09:04 +0200 |
---|---|---|
committer | Mauro Carvalho Chehab <mchehab@s-opensource.com> | 2016-09-22 17:54:49 +0200 |
commit | d28d7f852ee4028e41932891e55664abe75f00de (patch) | |
tree | 0d96d2c35468555b7e99d370050ff97f53f328f1 /drivers/media/usb/cx231xx/cx231xx-dvb.c | |
parent | [media] cx23885: attach si2165 driver via i2c_client (diff) | |
download | linux-d28d7f852ee4028e41932891e55664abe75f00de.tar.xz linux-d28d7f852ee4028e41932891e55664abe75f00de.zip |
[media] cx231xx: Prepare for attaching new style i2c_client DVB demod drivers
cx231xx does not yet support attaching new-style i2c_client DVB demod
drivers. Add necessary code base on tuner support for i2c_client.
Signed-off-by: Matthias Schwarzott <zzam@gentoo.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
Diffstat (limited to 'drivers/media/usb/cx231xx/cx231xx-dvb.c')
-rw-r--r-- | drivers/media/usb/cx231xx/cx231xx-dvb.c | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/drivers/media/usb/cx231xx/cx231xx-dvb.c b/drivers/media/usb/cx231xx/cx231xx-dvb.c index ab2fb9fa0cd1..f03034588343 100644 --- a/drivers/media/usb/cx231xx/cx231xx-dvb.c +++ b/drivers/media/usb/cx231xx/cx231xx-dvb.c @@ -65,6 +65,7 @@ struct cx231xx_dvb { struct dmx_frontend fe_hw; struct dmx_frontend fe_mem; struct dvb_net net; + struct i2c_client *i2c_client_demod; struct i2c_client *i2c_client_tuner; }; @@ -586,8 +587,14 @@ static void unregister_dvb(struct cx231xx_dvb *dvb) dvb->demux.dmx.remove_frontend(&dvb->demux.dmx, &dvb->fe_hw); dvb_dmxdev_release(&dvb->dmxdev); dvb_dmx_release(&dvb->demux); - client = dvb->i2c_client_tuner; /* remove I2C tuner */ + client = dvb->i2c_client_tuner; + if (client) { + module_put(client->dev.driver->owner); + i2c_unregister_device(client); + } + /* remove I2C demod */ + client = dvb->i2c_client_demod; if (client) { module_put(client->dev.driver->owner); i2c_unregister_device(client); |