diff options
author | Hans Verkuil <hans.verkuil@cisco.com> | 2013-04-08 15:25:04 -0400 |
---|---|---|
committer | Mauro Carvalho Chehab <mchehab@redhat.com> | 2013-04-14 18:48:12 -0400 |
commit | 3de09fbbfaa521e68675bd30cfece252c4856600 (patch) | |
tree | a32c40ecf44602acd2b13b860ce629e70b68160e /drivers/media/usb/em28xx | |
parent | b8399b83058848979538932473d817559f7ff8fb (diff) |
[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: Hans Verkuil <hans.verkuil@cisco.com>
Tested-by: Frank Schäfer <fschaefer.oss@googlemail.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Diffstat (limited to 'drivers/media/usb/em28xx')
-rw-r--r-- | drivers/media/usb/em28xx/em28xx-dvb.c | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/drivers/media/usb/em28xx/em28xx-dvb.c b/drivers/media/usb/em28xx/em28xx-dvb.c index 42a6a2696224..1f1f56ff6294 100644 --- a/drivers/media/usb/em28xx/em28xx-dvb.c +++ b/drivers/media/usb/em28xx/em28xx-dvb.c | |||
@@ -178,7 +178,8 @@ static inline int em28xx_dvb_urb_data_copy(struct em28xx *dev, struct urb *urb) | |||
178 | static int em28xx_start_streaming(struct em28xx_dvb *dvb) | 178 | static int em28xx_start_streaming(struct em28xx_dvb *dvb) |
179 | { | 179 | { |
180 | int rc; | 180 | int rc; |
181 | struct em28xx *dev = dvb->adapter.priv; | 181 | struct em28xx_i2c_bus *i2c_bus = dvb->adapter.priv; |
182 | struct em28xx *dev = i2c_bus->dev; | ||
182 | int dvb_max_packet_size, packet_multiplier, dvb_alt; | 183 | int dvb_max_packet_size, packet_multiplier, dvb_alt; |
183 | 184 | ||
184 | if (dev->dvb_xfer_bulk) { | 185 | if (dev->dvb_xfer_bulk) { |
@@ -217,7 +218,8 @@ static int em28xx_start_streaming(struct em28xx_dvb *dvb) | |||
217 | 218 | ||
218 | static int em28xx_stop_streaming(struct em28xx_dvb *dvb) | 219 | static int em28xx_stop_streaming(struct em28xx_dvb *dvb) |
219 | { | 220 | { |
220 | struct em28xx *dev = dvb->adapter.priv; | 221 | struct em28xx_i2c_bus *i2c_bus = dvb->adapter.priv; |
222 | struct em28xx *dev = i2c_bus->dev; | ||
221 | 223 | ||
222 | em28xx_stop_urbs(dev); | 224 | em28xx_stop_urbs(dev); |
223 | 225 | ||
@@ -839,7 +841,7 @@ static int em28xx_register_dvb(struct em28xx_dvb *dvb, struct module *module, | |||
839 | if (dvb->fe[1]) | 841 | if (dvb->fe[1]) |
840 | dvb->fe[1]->ops.ts_bus_ctrl = em28xx_dvb_bus_ctrl; | 842 | dvb->fe[1]->ops.ts_bus_ctrl = em28xx_dvb_bus_ctrl; |
841 | 843 | ||
842 | dvb->adapter.priv = dev; | 844 | dvb->adapter.priv = &dev->i2c_bus[dev->def_i2c_bus]; |
843 | 845 | ||
844 | /* register frontend */ | 846 | /* register frontend */ |
845 | result = dvb_register_frontend(&dvb->adapter, dvb->fe[0]); | 847 | result = dvb_register_frontend(&dvb->adapter, dvb->fe[0]); |