summaryrefslogtreecommitdiffstats
path: root/drivers/media/dvb
diff options
context:
space:
mode:
authorPatrick Boettcher <pb@linuxtv.org>2006-02-07 09:49:12 +0100
committerMauro Carvalho Chehab <mchehab@infradead.org>2006-02-07 09:53:05 +0100
commiteba841ed1d00e13144c1063b304c1537b774a747 (patch)
tree9ded43e6b6789163169e75e8521ee33ed4a4d39a /drivers/media/dvb
parentV4L/DVB (3310): Use MT352 parallel transport function for all Bluebird Fusion... (diff)
downloadlinux-eba841ed1d00e13144c1063b304c1537b774a747.tar.xz
linux-eba841ed1d00e13144c1063b304c1537b774a747.zip
V4L/DVB (3312): FIX: Multiple usage of VP7045-based devices
Reassigning function pointers in a static led to infinite loops when using multiple VP7045-based device at the same time on one system. Using kmalloc'd copies for reassignments is better. Signed-off-by: Patrick Boettcher <pb@linuxtv.org> Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
Diffstat (limited to 'drivers/media/dvb')
-rw-r--r--drivers/media/dvb/dvb-usb/vp7045-fe.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/drivers/media/dvb/dvb-usb/vp7045-fe.c b/drivers/media/dvb/dvb-usb/vp7045-fe.c
index 5242cca5db4a..9999336aeeb6 100644
--- a/drivers/media/dvb/dvb-usb/vp7045-fe.c
+++ b/drivers/media/dvb/dvb-usb/vp7045-fe.c
@@ -23,10 +23,11 @@
struct vp7045_fe_state {
struct dvb_frontend fe;
+ struct dvb_frontend_ops ops;
+
struct dvb_usb_device *d;
};
-
static int vp7045_fe_read_status(struct dvb_frontend* fe, fe_status_t *status)
{
struct vp7045_fe_state *state = fe->demodulator_priv;
@@ -150,7 +151,8 @@ struct dvb_frontend * vp7045_fe_attach(struct dvb_usb_device *d)
goto error;
s->d = d;
- s->fe.ops = &vp7045_fe_ops;
+ memcpy(&s->ops, &vp7045_fe_ops, sizeof(struct dvb_frontend_ops));
+ s->fe.ops = &s->ops;
s->fe.demodulator_priv = s;
goto success;