]> git.ipfire.org Git - thirdparty/kernel/stable-queue.git/commitdiff
3.0-stable patches
authorGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Mon, 26 Mar 2012 21:57:58 +0000 (14:57 -0700)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Mon, 26 Mar 2012 21:57:58 +0000 (14:57 -0700)
added patches:
lgdt330x-fix-signedness-error-in-i2c_read_demod_bytes.patch
pvrusb2-fix-7mhz-8mhz-dvb-t-tuner-support-for-hvr1900-rev-d1f5.patch

queue-3.0/lgdt330x-fix-signedness-error-in-i2c_read_demod_bytes.patch [new file with mode: 0644]
queue-3.0/pvrusb2-fix-7mhz-8mhz-dvb-t-tuner-support-for-hvr1900-rev-d1f5.patch [new file with mode: 0644]
queue-3.0/series

diff --git a/queue-3.0/lgdt330x-fix-signedness-error-in-i2c_read_demod_bytes.patch b/queue-3.0/lgdt330x-fix-signedness-error-in-i2c_read_demod_bytes.patch
new file mode 100644 (file)
index 0000000..e30e67c
--- /dev/null
@@ -0,0 +1,50 @@
+From 34817174fca0c5512c2d5b6ea0fc37a0337ce1d8 Mon Sep 17 00:00:00 2001
+From: Xi Wang <xi.wang@gmail.com>
+Date: Tue, 14 Feb 2012 14:32:41 -0300
+Subject: [media] lgdt330x: fix signedness error in i2c_read_demod_bytes()
+
+From: Xi Wang <xi.wang@gmail.com>
+
+commit 34817174fca0c5512c2d5b6ea0fc37a0337ce1d8 upstream.
+
+The error handling in lgdt3303_read_status() and lgdt330x_read_ucblocks()
+doesn't work, because i2c_read_demod_bytes() returns a u8 and (err < 0)
+is always false.
+
+        err = i2c_read_demod_bytes(state, 0x58, buf, 1);
+        if (err < 0)
+                return err;
+
+Change the return type of i2c_read_demod_bytes() to int.  Also change
+the return value on error to -EIO to make (err < 0) work.
+
+Signed-off-by: Xi Wang <xi.wang@gmail.com>
+Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+
+---
+ drivers/media/dvb/frontends/lgdt330x.c |    6 ++++--
+ 1 file changed, 4 insertions(+), 2 deletions(-)
+
+--- a/drivers/media/dvb/frontends/lgdt330x.c
++++ b/drivers/media/dvb/frontends/lgdt330x.c
+@@ -104,8 +104,8 @@ static int i2c_write_demod_bytes (struct
+  * then reads the data returned for (len) bytes.
+  */
+-static u8 i2c_read_demod_bytes (struct lgdt330x_state* state,
+-                             enum I2C_REG reg, u8* buf, int len)
++static int i2c_read_demod_bytes(struct lgdt330x_state *state,
++                              enum I2C_REG reg, u8 *buf, int len)
+ {
+       u8 wr [] = { reg };
+       struct i2c_msg msg [] = {
+@@ -118,6 +118,8 @@ static u8 i2c_read_demod_bytes (struct l
+       ret = i2c_transfer(state->i2c, msg, 2);
+       if (ret != 2) {
+               printk(KERN_WARNING "lgdt330x: %s: addr 0x%02x select 0x%02x error (ret == %i)\n", __func__, state->config->demod_address, reg, ret);
++              if (ret >= 0)
++                      ret = -EIO;
+       } else {
+               ret = 0;
+       }
diff --git a/queue-3.0/pvrusb2-fix-7mhz-8mhz-dvb-t-tuner-support-for-hvr1900-rev-d1f5.patch b/queue-3.0/pvrusb2-fix-7mhz-8mhz-dvb-t-tuner-support-for-hvr1900-rev-d1f5.patch
new file mode 100644 (file)
index 0000000..b93f2ed
--- /dev/null
@@ -0,0 +1,48 @@
+From 9ab2393fc3e460cd2040de1483918eb17abb822f Mon Sep 17 00:00:00 2001
+From: Michael Krufky <mkrufky@linuxtv.org>
+Date: Tue, 7 Feb 2012 13:28:33 -0300
+Subject: [media] pvrusb2: fix 7MHz & 8MHz DVB-T tuner support for HVR1900 rev D1F5
+
+From: Michael Krufky <mkrufky@linuxtv.org>
+
+commit 9ab2393fc3e460cd2040de1483918eb17abb822f upstream.
+
+The D1F5 revision of the WinTV HVR-1900 uses a tda18271c2 tuner
+instead of a tda18271c1 tuner as used in revision D1E9. To
+account for this, we must hardcode the frontend configuration
+to use the same IF frequency configuration for both revisions
+of the device.
+
+6MHz DVB-T is unaffected by this issue, as the recommended
+IF Frequency configuration for 6MHz DVB-T is the same on both
+c1 and c2 revisions of the tda18271 tuner.
+
+Signed-off-by: Michael Krufky <mkrufky@linuxtv.org>
+Cc: Mike Isely <isely@pobox.com>
+Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+
+---
+ drivers/media/video/pvrusb2/pvrusb2-devattr.c |   10 ++++++++++
+ 1 file changed, 10 insertions(+)
+
+--- a/drivers/media/video/pvrusb2/pvrusb2-devattr.c
++++ b/drivers/media/video/pvrusb2/pvrusb2-devattr.c
+@@ -319,7 +319,17 @@ static struct tda829x_config tda829x_no_
+       .probe_tuner = TDA829X_DONT_PROBE,
+ };
++static struct tda18271_std_map hauppauge_tda18271_dvbt_std_map = {
++        .dvbt_6   = { .if_freq = 3300, .agc_mode = 3, .std = 4,
++                      .if_lvl = 1, .rfagc_top = 0x37, },
++        .dvbt_7   = { .if_freq = 3800, .agc_mode = 3, .std = 5,
++                      .if_lvl = 1, .rfagc_top = 0x37, },
++        .dvbt_8   = { .if_freq = 4300, .agc_mode = 3, .std = 6,
++                      .if_lvl = 1, .rfagc_top = 0x37, },
++};
++
+ static struct tda18271_config hauppauge_tda18271_dvb_config = {
++      .std_map = &hauppauge_tda18271_dvbt_std_map,
+       .gate    = TDA18271_GATE_ANALOG,
+       .output_opt = TDA18271_OUTPUT_LT_OFF,
+ };
index 0d3a308c90736cb80b1438584a6e78a47f080071..3249bcaba2ebaa5fbedaa6ea3b77012da7e7e3bf 100644 (file)
@@ -74,3 +74,5 @@ usbnet-don-t-clear-urb-dev-in-tx_complete.patch
 x86-32-fix-endless-loop-when-processing-signals-for-kernel-tasks.patch
 proc-ns-use-d_set_d_op-api-to-set-dentry-ops-in-proc_ns_instantiate.patch
 hwmon-fam15h_power-correct-sign-extension-of-running_avg_capture.patch
+lgdt330x-fix-signedness-error-in-i2c_read_demod_bytes.patch
+pvrusb2-fix-7mhz-8mhz-dvb-t-tuner-support-for-hvr1900-rev-d1f5.patch