diff options
author | Patrick Boettcher <pb@linuxtv.org> | 2006-02-05 18:35:18 +0100 |
---|---|---|
committer | Patrick Boettcher <pb@linuxtv.org> | 2006-02-05 18:35:18 +0100 |
commit | 8d97e37efd369482cc65c80d32e1b35a1ffe3801 (patch) | |
tree | 5b7fd6574b6b78e285594c5f24a96d564a8a03cf /linux/drivers/media/dvb/dvb-usb | |
parent | 0054e2699c0097bfd18c1811a388514e7a85e98e (diff) | |
download | mediapointer-dvb-s2-8d97e37efd369482cc65c80d32e1b35a1ffe3801.tar.gz mediapointer-dvb-s2-8d97e37efd369482cc65c80d32e1b35a1ffe3801.tar.bz2 |
FIX: Multiple usage of VP7045-based devices
From: Patrick Boettcher <pb@linuxtv.org>
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.
bug-fix
Signed-off-by: Patrick Boettcher <pb@linuxtv.org>
Diffstat (limited to 'linux/drivers/media/dvb/dvb-usb')
-rw-r--r-- | linux/drivers/media/dvb/dvb-usb/vp7045-fe.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/linux/drivers/media/dvb/dvb-usb/vp7045-fe.c b/linux/drivers/media/dvb/dvb-usb/vp7045-fe.c index 5242cca5d..9999336ae 100644 --- a/linux/drivers/media/dvb/dvb-usb/vp7045-fe.c +++ b/linux/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; |