aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/media/dvb/frontends/stv0299.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/media/dvb/frontends/stv0299.c')
-rw-r--r--drivers/media/dvb/frontends/stv0299.c9
1 files changed, 6 insertions, 3 deletions
diff --git a/drivers/media/dvb/frontends/stv0299.c b/drivers/media/dvb/frontends/stv0299.c
index 96648a75440d..93483769eca8 100644
--- a/drivers/media/dvb/frontends/stv0299.c
+++ b/drivers/media/dvb/frontends/stv0299.c
@@ -92,11 +92,14 @@ static int stv0299_writeregI (struct stv0299_state* state, u8 reg, u8 data)
92 return (ret != 1) ? -EREMOTEIO : 0; 92 return (ret != 1) ? -EREMOTEIO : 0;
93} 93}
94 94
95int stv0299_writereg (struct dvb_frontend* fe, u8 reg, u8 data) 95int stv0299_write(struct dvb_frontend* fe, u8 *buf, int len)
96{ 96{
97 struct stv0299_state* state = fe->demodulator_priv; 97 struct stv0299_state* state = fe->demodulator_priv;
98 98
99 return stv0299_writeregI(state, reg, data); 99 if (len != 2)
100 return -EINVAL;
101
102 return stv0299_writeregI(state, buf[0], buf[1]);
100} 103}
101 104
102static u8 stv0299_readreg (struct stv0299_state* state, u8 reg) 105static u8 stv0299_readreg (struct stv0299_state* state, u8 reg)
@@ -694,6 +697,7 @@ static struct dvb_frontend_ops stv0299_ops = {
694 697
695 .init = stv0299_init, 698 .init = stv0299_init,
696 .sleep = stv0299_sleep, 699 .sleep = stv0299_sleep,
700 .write = stv0299_write,
697 .i2c_gate_ctrl = stv0299_i2c_gate_ctrl, 701 .i2c_gate_ctrl = stv0299_i2c_gate_ctrl,
698 702
699 .set_frontend = stv0299_set_frontend, 703 .set_frontend = stv0299_set_frontend,
@@ -724,5 +728,4 @@ MODULE_AUTHOR("Ralph Metzler, Holger Waechtler, Peter Schildmann, Felix Domke, "
724 "Andreas Oberritter, Andrew de Quincey, Kenneth Aafly"); 728 "Andreas Oberritter, Andrew de Quincey, Kenneth Aafly");
725MODULE_LICENSE("GPL"); 729MODULE_LICENSE("GPL");
726 730
727EXPORT_SYMBOL(stv0299_writereg);
728EXPORT_SYMBOL(stv0299_attach); 731EXPORT_SYMBOL(stv0299_attach);