Commit 43bc3f41 authored by Ye Jianjun (Joey's avatar Ye Jianjun (Joey Committed by Linus Torvalds

[PATCH] dvb: usb: dtt200u: copy frontend_ops before modifying

Fix: copy frontend_ops before modifying
Signed-off-by: default avatarYe Jianjun (Joey) <joeyye@trident.com.cn>
Signed-off-by: default avatarPatrick Boettcher <pb@linuxtv.org>
Signed-off-by: default avatarJohannes Stezenbach <js@linuxtv.org>
Signed-off-by: default avatarAndrew Morton <akpm@osdl.org>
Signed-off-by: default avatarLinus Torvalds <torvalds@osdl.org>
parent 54127d64
...@@ -18,6 +18,7 @@ struct dtt200u_fe_state { ...@@ -18,6 +18,7 @@ struct dtt200u_fe_state {
struct dvb_frontend_parameters fep; struct dvb_frontend_parameters fep;
struct dvb_frontend frontend; struct dvb_frontend frontend;
struct dvb_frontend_ops ops;
}; };
static int dtt200u_fe_read_status(struct dvb_frontend* fe, fe_status_t *stat) static int dtt200u_fe_read_status(struct dvb_frontend* fe, fe_status_t *stat)
...@@ -163,8 +164,9 @@ struct dvb_frontend* dtt200u_fe_attach(struct dvb_usb_device *d) ...@@ -163,8 +164,9 @@ struct dvb_frontend* dtt200u_fe_attach(struct dvb_usb_device *d)
deb_info("attaching frontend dtt200u\n"); deb_info("attaching frontend dtt200u\n");
state->d = d; state->d = d;
memcpy(&state->ops,&dtt200u_fe_ops,sizeof(struct dvb_frontend_ops));
state->frontend.ops = &dtt200u_fe_ops; state->frontend.ops = &state->ops;
state->frontend.demodulator_priv = state; state->frontend.demodulator_priv = state;
goto success; goto success;
......
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