]> git.ipfire.org Git - thirdparty/kernel/stable-queue.git/commitdiff
.27 patches
authorGreg Kroah-Hartman <gregkh@suse.de>
Sat, 18 Sep 2010 17:58:18 +0000 (10:58 -0700)
committerGreg Kroah-Hartman <gregkh@suse.de>
Sat, 18 Sep 2010 17:58:18 +0000 (10:58 -0700)
queue-2.6.27/apm_power-add-missing-break-statement.patch [new file with mode: 0644]
queue-2.6.27/hwmon-f75375s-do-not-overwrite-values-read-from-registers.patch [new file with mode: 0644]
queue-2.6.27/hwmon-f75375s-shift-control-mode-to-the-correct-bit-position.patch [new file with mode: 0644]
queue-2.6.27/series

diff --git a/queue-2.6.27/apm_power-add-missing-break-statement.patch b/queue-2.6.27/apm_power-add-missing-break-statement.patch
new file mode 100644 (file)
index 0000000..0ff6f97
--- /dev/null
@@ -0,0 +1,30 @@
+From 1d220334d6a8a711149234dc5f98d34ae02226b8 Mon Sep 17 00:00:00 2001
+From: Anton Vorontsov <cbouatmailru@gmail.com>
+Date: Wed, 8 Sep 2010 00:10:26 +0400
+Subject: apm_power: Add missing break statement
+
+From: Anton Vorontsov <cbouatmailru@gmail.com>
+
+commit 1d220334d6a8a711149234dc5f98d34ae02226b8 upstream.
+
+The missing break statement causes wrong capacity calculation for
+batteries that report energy.
+
+Reported-by: d binderman <dcb314@hotmail.com>
+Signed-off-by: Anton Vorontsov <cbouatmailru@gmail.com>
+Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
+
+---
+ drivers/power/apm_power.c |    1 +
+ 1 file changed, 1 insertion(+)
+
+--- a/drivers/power/apm_power.c
++++ b/drivers/power/apm_power.c
+@@ -233,6 +233,7 @@ static int calculate_capacity(enum apm_s
+               empty_design_prop = POWER_SUPPLY_PROP_ENERGY_EMPTY_DESIGN;
+               now_prop = POWER_SUPPLY_PROP_ENERGY_NOW;
+               avg_prop = POWER_SUPPLY_PROP_ENERGY_AVG;
++              break;
+       case SOURCE_VOLTAGE:
+               full_prop = POWER_SUPPLY_PROP_VOLTAGE_MAX;
+               empty_prop = POWER_SUPPLY_PROP_VOLTAGE_MIN;
diff --git a/queue-2.6.27/hwmon-f75375s-do-not-overwrite-values-read-from-registers.patch b/queue-2.6.27/hwmon-f75375s-do-not-overwrite-values-read-from-registers.patch
new file mode 100644 (file)
index 0000000..2161d5c
--- /dev/null
@@ -0,0 +1,42 @@
+From c3b327d60bbba3f5ff8fd87d1efc0e95eb6c121b Mon Sep 17 00:00:00 2001
+From: Guillem Jover <guillem@hadrons.org>
+Date: Fri, 17 Sep 2010 17:24:12 +0200
+Subject: hwmon: (f75375s) Do not overwrite values read from registers
+
+From: Guillem Jover <guillem@hadrons.org>
+
+commit c3b327d60bbba3f5ff8fd87d1efc0e95eb6c121b upstream.
+
+All bits in the values read from registers to be used for the next
+write were getting overwritten, avoid doing so to not mess with the
+current configuration.
+
+Signed-off-by: Guillem Jover <guillem@hadrons.org>
+Cc: Riku Voipio <riku.voipio@iki.fi>
+Signed-off-by: Jean Delvare <khali@linux-fr.org>
+Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
+
+---
+ drivers/hwmon/f75375s.c |    4 ++--
+ 1 file changed, 2 insertions(+), 2 deletions(-)
+
+--- a/drivers/hwmon/f75375s.c
++++ b/drivers/hwmon/f75375s.c
+@@ -298,7 +298,7 @@ static int set_pwm_enable_direct(struct
+               return -EINVAL;
+       fanmode = f75375_read8(client, F75375_REG_FAN_TIMER);
+-      fanmode = ~(3 << FAN_CTRL_MODE(nr));
++      fanmode &= ~(3 << FAN_CTRL_MODE(nr));
+       switch (val) {
+       case 0: /* Full speed */
+@@ -350,7 +350,7 @@ static ssize_t set_pwm_mode(struct devic
+       mutex_lock(&data->update_lock);
+       conf = f75375_read8(client, F75375_REG_CONFIG1);
+-      conf = ~(1 << FAN_CTRL_LINEAR(nr));
++      conf &= ~(1 << FAN_CTRL_LINEAR(nr));
+       if (val == 0)
+               conf |= (1 << FAN_CTRL_LINEAR(nr)) ;
diff --git a/queue-2.6.27/hwmon-f75375s-shift-control-mode-to-the-correct-bit-position.patch b/queue-2.6.27/hwmon-f75375s-shift-control-mode-to-the-correct-bit-position.patch
new file mode 100644 (file)
index 0000000..f8cb520
--- /dev/null
@@ -0,0 +1,33 @@
+From 96f3640894012be7dd15a384566bfdc18297bc6c Mon Sep 17 00:00:00 2001
+From: Guillem Jover <guillem@hadrons.org>
+Date: Fri, 17 Sep 2010 17:24:11 +0200
+Subject: hwmon: (f75375s) Shift control mode to the correct bit position
+
+From: Guillem Jover <guillem@hadrons.org>
+
+commit 96f3640894012be7dd15a384566bfdc18297bc6c upstream.
+
+The spec notes that fan0 and fan1 control mode bits are located in bits
+7-6 and 5-4 respectively, but the FAN_CTRL_MODE macro was making the
+bits shift by 5 instead of by 4.
+
+Signed-off-by: Guillem Jover <guillem@hadrons.org>
+Cc: Riku Voipio <riku.voipio@iki.fi>
+Signed-off-by: Jean Delvare <khali@linux-fr.org>
+Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
+
+---
+ drivers/hwmon/f75375s.c |    2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+--- a/drivers/hwmon/f75375s.c
++++ b/drivers/hwmon/f75375s.c
+@@ -79,7 +79,7 @@ I2C_CLIENT_INSMOD_2(f75373, f75375);
+ #define F75375_REG_PWM2_DROP_DUTY     0x6C
+ #define FAN_CTRL_LINEAR(nr)           (4 + nr)
+-#define FAN_CTRL_MODE(nr)             (5 + ((nr) * 2))
++#define FAN_CTRL_MODE(nr)             (4 + ((nr) * 2))
+ /*
+  * Data structures and manipulation thereof
index a36e6f51b8e843717f9dc7c4bebc9876c98a937d..315c66d024cd0928722799001f681beb2bdff9c8 100644 (file)
@@ -5,4 +5,7 @@ irda-off-by-one.patch
 bounce-call-flush_dcache_page-after-bounce_copy_vec.patch
 x86-64-compat-test-rax-for-the-syscall-number-not-eax.patch
 compat-make-compat_alloc_user_space-incorporate-the-access_ok.patch
+hwmon-f75375s-shift-control-mode-to-the-correct-bit-position.patch
+hwmon-f75375s-do-not-overwrite-values-read-from-registers.patch
+apm_power-add-missing-break-statement.patch
 x86-64-compat-retruncate-rax-after-ia32-syscall-entry-tracing.patch