[DVB patch 26/54] usb: dtt200u: copy frontend_ops before modifying

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



From: Ye Jianjun (Joey) <[email protected]>

Fix: copy frontend_ops before modifying

Signed-off-by: Ye Jianjun (Joey) <[email protected]>
Signed-off-by: Patrick Boettcher <[email protected]>
Signed-off-by: Johannes Stezenbach <[email protected]>

 drivers/media/dvb/dvb-usb/dtt200u-fe.c |    4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

--- linux-2.6.13-git4.orig/drivers/media/dvb/dvb-usb/dtt200u-fe.c	2005-09-04 22:24:23.000000000 +0200
+++ linux-2.6.13-git4/drivers/media/dvb/dvb-usb/dtt200u-fe.c	2005-09-04 22:28:19.000000000 +0200
@@ -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)
@@ -163,8 +164,9 @@ struct dvb_frontend* dtt200u_fe_attach(s
 	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;

--

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

[Index of Archives]     [Kernel Newbies]     [Netfilter]     [Bugtraq]     [Photo]     [Gimp]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Video 4 Linux]     [Linux for the blind]
  Powered by Linux