Skip to content

Commit

Permalink
[media] cx231xx: Prepare for attaching new style i2c_client DVB demod…
Browse files Browse the repository at this point in the history
… 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>
  • Loading branch information
Matthias Schwarzott authored and Mauro Carvalho Chehab committed Sep 22, 2016
1 parent 7cb278b commit d28d7f8
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion drivers/media/usb/cx231xx/cx231xx-dvb.c
Original file line number Diff line number Diff line change
@@ -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);

0 comments on commit d28d7f8

Please sign in to comment.