diff options
author | Manu Abraham <devnull@localhost> | 2005-05-26 19:55:15 +0000 |
---|---|---|
committer | Manu Abraham <devnull@localhost> | 2005-05-26 19:55:15 +0000 |
commit | ffa8b048605120455c77ad76cae0fc0b12318bdf (patch) | |
tree | b4e7658195f7c86d54980570844c296dd8961f0c /linux/drivers/media/dvb/bt8xx/dst.c | |
parent | 48141456c69e979b75407ba010fd6198f0b8ce32 (diff) | |
download | mediapointer-dvb-s2-ffa8b048605120455c77ad76cae0fc0b12318bdf.tar.gz mediapointer-dvb-s2-ffa8b048605120455c77ad76cae0fc0b12318bdf.tar.bz2 |
Fix bug in mini DiSEqC code
The bug was visible as a warning with gcc-3.4.4(prerelease)
Message:
drivers/media/dvb/bt8xx/dst.c: 1349: warning: initialization from incompatible pointer type.
Signed-off-by: Manu Abraham <manu@kromtek.com>
Diffstat (limited to 'linux/drivers/media/dvb/bt8xx/dst.c')
-rw-r--r-- | linux/drivers/media/dvb/bt8xx/dst.c | 31 |
1 files changed, 26 insertions, 5 deletions
diff --git a/linux/drivers/media/dvb/bt8xx/dst.c b/linux/drivers/media/dvb/bt8xx/dst.c index d047e349d..2efc6f1ca 100644 --- a/linux/drivers/media/dvb/bt8xx/dst.c +++ b/linux/drivers/media/dvb/bt8xx/dst.c @@ -915,13 +915,11 @@ static int dst_tone_power_cmd(struct dst_state* state) paket[2] = 0x02; else paket[2] = 0; - if (state->minicmd == SEC_MINI_A) - paket[3] = 0x02; - else - paket[3] = 0; + paket[3] = state->tx_tuna[3]; paket[7] = dst_check_sum (paket, 7); dst_command(state, paket, 8); + return 0; } @@ -1134,6 +1132,29 @@ static int dst_set_tone(struct dvb_frontend* fe, fe_sec_tone_mode_t tone) return 0; } +static int dst_send_burst(struct dvb_frontend *fe, fe_sec_mini_cmd_t minicmd) +{ + struct dst_state *state = fe->demodulator_priv; + + if ((state->dst_type == DST_TYPE_IS_TERR) || (state->dst_type == DST_TYPE_IS_CABLE)) + return 0; + + state->minicmd = minicmd; + + switch (minicmd) { + case SEC_MINI_A: + state->tx_tuna[3] = 0x02; + break; + case SEC_MINI_B: + state->tx_tuna[3] = 0xff; + break; + } + dst_tone_power_cmd(state); + + return 0; +} + + static int dst_init(struct dvb_frontend* fe) { struct dst_state* state = (struct dst_state*) fe->demodulator_priv; @@ -1346,7 +1367,7 @@ static struct dvb_frontend_ops dst_dvbs_ops = { .read_signal_strength = dst_read_signal_strength, .read_snr = dst_read_snr, - .diseqc_send_burst = dst_set_tone, + .diseqc_send_burst = dst_send_burst, .diseqc_send_master_cmd = dst_set_diseqc, .set_voltage = dst_set_voltage, .set_tone = dst_set_tone, |