Skip to content

Commit

Permalink
[PATCH] dvb: usb: dtt200u: copy frontend_ops before modifying
Browse files Browse the repository at this point in the history
Fix: copy frontend_ops before modifying

Signed-off-by: Ye Jianjun (Joey) <joeyye@trident.com.cn>
Signed-off-by: Patrick Boettcher <pb@linuxtv.org>
Signed-off-by: Johannes Stezenbach <js@linuxtv.org>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
  • Loading branch information
Ye Jianjun (Joey authored and Linus Torvalds committed Sep 9, 2005
1 parent 54127d6 commit 43bc3f4
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion drivers/media/dvb/dvb-usb/dtt200u-fe.c
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ struct dtt200u_fe_state {

struct dvb_frontend_parameters fep;
struct dvb_frontend frontend;
struct dvb_frontend_ops ops;
};

static int dtt200u_fe_read_status(struct dvb_frontend* fe, fe_status_t *stat)
Expand Down Expand Up @@ -163,8 +164,9 @@ struct dvb_frontend* dtt200u_fe_attach(struct dvb_usb_device *d)
deb_info("attaching frontend dtt200u\n");

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;

goto success;
Expand Down

0 comments on commit 43bc3f4

Please sign in to comment.