[kernel] r16012 - in dists/trunk/linux-2.6/debian/patches: bugfix/all series

Ben Hutchings benh at alioth.debian.org
Fri Jul 23 23:51:52 UTC 2010


Author: benh
Date: Fri Jul 23 23:51:51 2010
New Revision: 16012

Log:
Use upstream fix for ds2782_battery

Added:
   dists/trunk/linux-2.6/debian/patches/bugfix/all/ds2782_battery-Rename-get_current-to-fix-build-failure.patch
Deleted:
   dists/trunk/linux-2.6/debian/patches/bugfix/all/ds2782_battery-Rename-get_current-and-get_voltage-op.patch
Modified:
   dists/trunk/linux-2.6/debian/patches/series/base

Added: dists/trunk/linux-2.6/debian/patches/bugfix/all/ds2782_battery-Rename-get_current-to-fix-build-failure.patch
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ dists/trunk/linux-2.6/debian/patches/bugfix/all/ds2782_battery-Rename-get_current-to-fix-build-failure.patch	Fri Jul 23 23:51:51 2010	(r16012)
@@ -0,0 +1,102 @@
+From: Peter Huewe <peterhuewe at gmx.de>
+Date: Thu, 13 May 2010 01:54:57 +0200
+Subject: [PATCH] ds2782_battery: Rename get_current to fix build failure / name conflict
+
+commit eb9650d6d989f24f21232a055d8fd45f1a9dcf99 upstream.
+
+This patch changes the name of get_current function pointer to
+get_battery_current to resolve a name conflict with the get_current
+macro defined in current.h.
+
+This conflict resulted in a build-failure[1] for the sh4 arch
+allyesconfig:
+
+  drivers/power/ds2782_battery.c:216:48: error: macro "get_current"
+  passed 2 arguments, but takes just
+
+This patch fixes the issue. To be consistent the other function pointers
+(_voltage,_capacity) were renamed too.
+
+Signed-off-by: Peter Huewe <peterhuewe at gmx.de>
+Acked-by: Ryan Mallon <ryan at bluewatersys.com>
+Acked-by: Mike Rapoport <mike at compulab.co.il>
+Signed-off-by: Anton Vorontsov <cbouatmailru at gmail.com>
+---
+ drivers/power/ds2782_battery.c |   29 ++++++++++++++---------------
+ 1 files changed, 14 insertions(+), 15 deletions(-)
+
+diff --git a/drivers/power/ds2782_battery.c b/drivers/power/ds2782_battery.c
+index d762a0c..9b3b4b7 100644
+--- a/drivers/power/ds2782_battery.c
++++ b/drivers/power/ds2782_battery.c
+@@ -43,10 +43,9 @@
+ struct ds278x_info;
+ 
+ struct ds278x_battery_ops {
+-	int	(*get_current)(struct ds278x_info *info, int *current_uA);
+-	int	(*get_voltage)(struct ds278x_info *info, int *voltage_uA);
+-	int	(*get_capacity)(struct ds278x_info *info, int *capacity_uA);
+-
++	int (*get_battery_current)(struct ds278x_info *info, int *current_uA);
++	int (*get_battery_voltage)(struct ds278x_info *info, int *voltage_uA);
++	int (*get_battery_capacity)(struct ds278x_info *info, int *capacity_uA);
+ };
+ 
+ #define to_ds278x_info(x) container_of(x, struct ds278x_info, battery)
+@@ -213,11 +212,11 @@ static int ds278x_get_status(struct ds278x_info *info, int *status)
+ 	int current_uA;
+ 	int capacity;
+ 
+-	err = info->ops->get_current(info, &current_uA);
++	err = info->ops->get_battery_current(info, &current_uA);
+ 	if (err)
+ 		return err;
+ 
+-	err = info->ops->get_capacity(info, &capacity);
++	err = info->ops->get_battery_capacity(info, &capacity);
+ 	if (err)
+ 		return err;
+ 
+@@ -246,15 +245,15 @@ static int ds278x_battery_get_property(struct power_supply *psy,
+ 		break;
+ 
+ 	case POWER_SUPPLY_PROP_CAPACITY:
+-		ret = info->ops->get_capacity(info, &val->intval);
++		ret = info->ops->get_battery_capacity(info, &val->intval);
+ 		break;
+ 
+ 	case POWER_SUPPLY_PROP_VOLTAGE_NOW:
+-		ret = info->ops->get_voltage(info, &val->intval);
++		ret = info->ops->get_battery_voltage(info, &val->intval);
+ 		break;
+ 
+ 	case POWER_SUPPLY_PROP_CURRENT_NOW:
+-		ret = info->ops->get_current(info, &val->intval);
++		ret = info->ops->get_battery_current(info, &val->intval);
+ 		break;
+ 
+ 	case POWER_SUPPLY_PROP_TEMP:
+@@ -307,14 +306,14 @@ enum ds278x_num_id {
+ 
+ static struct ds278x_battery_ops ds278x_ops[] = {
+ 	[DS2782] = {
+-		.get_current  = ds2782_get_current,
+-		.get_voltage  = ds2782_get_voltage,
+-		.get_capacity = ds2782_get_capacity,
++		.get_battery_current  = ds2782_get_current,
++		.get_battery_voltage  = ds2782_get_voltage,
++		.get_battery_capacity = ds2782_get_capacity,
+ 	},
+ 	[DS2786] = {
+-		.get_current  = ds2786_get_current,
+-		.get_voltage  = ds2786_get_voltage,
+-		.get_capacity = ds2786_get_capacity,
++		.get_battery_current  = ds2786_get_current,
++		.get_battery_voltage  = ds2786_get_voltage,
++		.get_battery_capacity = ds2786_get_capacity,
+ 	}
+ };
+ 
+-- 
+1.7.1
+

Modified: dists/trunk/linux-2.6/debian/patches/series/base
==============================================================================
--- dists/trunk/linux-2.6/debian/patches/series/base	Fri Jul 23 23:43:51 2010	(r16011)
+++ dists/trunk/linux-2.6/debian/patches/series/base	Fri Jul 23 23:51:51 2010	(r16012)
@@ -59,4 +59,4 @@
 + bugfix/all/rtl8192su-Clean-up-in-case-of-an-error-in-mo.patch
 + bugfix/all/rtl8192su-Fix-procfs-code-for-interfaces-not.patch
 + bugfix/all/viafb-Depends-on-X86.patch
-+ bugfix/all/ds2782_battery-Rename-get_current-and-get_voltage-op.patch
++ bugfix/all/ds2782_battery-Rename-get_current-to-fix-build-failure.patch



More information about the Kernel-svn-changes mailing list