The Linux Kernel Mailing List
 help / color / mirror / Atom feed
From: Manu Abraham <manu@kromtek.com>
To: Andrew Morton <akpm@osdl.org>
Cc: Johannes Stezenbach <js@linuxtv.org>, linux-kernel@vger.kernel.org
Subject: [PATCH 1/5] Fix Mini DiSEqC bug
Date: Fri, 27 May 2005 00:34:39 +0400	[thread overview]
Message-ID: <429632DF.6080007@kromtek.com> (raw)

[-- Attachment #1: Type: text/plain, Size: 352 bytes --]

o 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>

dst.c |   31 ++++++++++++++++++++++++++-----
       1 files changed, 26 insertions(+), 5 deletions(-)








[-- Attachment #2: fix-compiler-warning.diff --]
[-- Type: text/x-patch, Size: 1485 bytes --]

--- linux-2.6.12-rc5.orig/drivers/media/dvb/bt8xx/dst.c	2005-05-03 20:10:56.000000000 +0400
+++ linux-2.6.12-rc5/drivers/media/dvb/bt8xx/dst.c	2005-05-26 10:36:37.000000000 +0400
@@ -915,13 +915,11 @@ static int dst_tone_power_cmd(struct dst
 		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_front
 	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_
 	.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,






                 reply	other threads:[~2005-05-26 20:40 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=429632DF.6080007@kromtek.com \
    --to=manu@kromtek.com \
    --cc=akpm@osdl.org \
    --cc=js@linuxtv.org \
    --cc=linux-kernel@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox