From: Barry Scott <barry.scott@onelan.co.uk>

Fix two problems with the signal strength value in the mt352.c frontend:
1. the 4 most significant bits are zeroed - shift and mask wrong way round
2. need to align the 12 bits from the registers at the top of the 16 bit
   returned value - otherwise the range is not 0 to 0xffff its 0xf000 to 0xffff

Signed-off-by: Barry Scott <barry.scott@onelan.co.uk>
Signed-off-by: Johannes Stezenbach <js@linuxtv.org>
Signed-off-by: Andrew Morton <akpm@osdl.org>
---

 drivers/media/dvb/frontends/mt352.c |    6 ++++--
 1 files changed, 4 insertions(+), 2 deletions(-)

diff -puN drivers/media/dvb/frontends/mt352.c~dvb-frontend-mt352-fix-signal-strength-reading drivers/media/dvb/frontends/mt352.c
--- devel/drivers/media/dvb/frontends/mt352.c~dvb-frontend-mt352-fix-signal-strength-reading	2005-09-04 16:51:07.000000000 -0700
+++ devel-akpm/drivers/media/dvb/frontends/mt352.c	2005-09-04 16:51:07.000000000 -0700
@@ -462,9 +462,11 @@ static int mt352_read_signal_strength(st
 {
 	struct mt352_state* state = fe->demodulator_priv;
 
-	u16 signal = ((mt352_read_register(state, AGC_GAIN_1) << 8) & 0x0f) |
-		      (mt352_read_register(state, AGC_GAIN_0));
+	/* align the 12 bit AGC gain with the most significant bits */
+	u16 signal = ((mt352_read_register(state, AGC_GAIN_1) & 0x0f) << 12) |
+		(mt352_read_register(state, AGC_GAIN_0) << 4);
 
+	/* inverse of gain is signal strength */
 	*strength = ~signal;
 	return 0;
 }
_