Commit 3de09fbb authored by Hans Verkuil's avatar Hans Verkuil Committed by Mauro Carvalho Chehab

[media] em28xx: fix kernel oops when watching digital TV

dvb->adapter.priv should also be set to the i2c bus since that's what
em28xx_tuner_callback expects.
Signed-off-by: default avatarHans Verkuil <hans.verkuil@cisco.com>
Tested-by: default avatarFrank Schäfer <fschaefer.oss@googlemail.com>
Signed-off-by: default avatarMauro Carvalho Chehab <mchehab@redhat.com>
parent b8399b83
...@@ -178,7 +178,8 @@ static inline int em28xx_dvb_urb_data_copy(struct em28xx *dev, struct urb *urb) ...@@ -178,7 +178,8 @@ static inline int em28xx_dvb_urb_data_copy(struct em28xx *dev, struct urb *urb)
static int em28xx_start_streaming(struct em28xx_dvb *dvb) static int em28xx_start_streaming(struct em28xx_dvb *dvb)
{ {
int rc; int rc;
struct em28xx *dev = dvb->adapter.priv; struct em28xx_i2c_bus *i2c_bus = dvb->adapter.priv;
struct em28xx *dev = i2c_bus->dev;
int dvb_max_packet_size, packet_multiplier, dvb_alt; int dvb_max_packet_size, packet_multiplier, dvb_alt;
if (dev->dvb_xfer_bulk) { if (dev->dvb_xfer_bulk) {
...@@ -217,7 +218,8 @@ static int em28xx_start_streaming(struct em28xx_dvb *dvb) ...@@ -217,7 +218,8 @@ static int em28xx_start_streaming(struct em28xx_dvb *dvb)
static int em28xx_stop_streaming(struct em28xx_dvb *dvb) static int em28xx_stop_streaming(struct em28xx_dvb *dvb)
{ {
struct em28xx *dev = dvb->adapter.priv; struct em28xx_i2c_bus *i2c_bus = dvb->adapter.priv;
struct em28xx *dev = i2c_bus->dev;
em28xx_stop_urbs(dev); em28xx_stop_urbs(dev);
...@@ -839,7 +841,7 @@ static int em28xx_register_dvb(struct em28xx_dvb *dvb, struct module *module, ...@@ -839,7 +841,7 @@ static int em28xx_register_dvb(struct em28xx_dvb *dvb, struct module *module,
if (dvb->fe[1]) if (dvb->fe[1])
dvb->fe[1]->ops.ts_bus_ctrl = em28xx_dvb_bus_ctrl; dvb->fe[1]->ops.ts_bus_ctrl = em28xx_dvb_bus_ctrl;
dvb->adapter.priv = dev; dvb->adapter.priv = &dev->i2c_bus[dev->def_i2c_bus];
/* register frontend */ /* register frontend */
result = dvb_register_frontend(&dvb->adapter, dvb->fe[0]); result = dvb_register_frontend(&dvb->adapter, dvb->fe[0]);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment