Skip to contentSkip to conversation

power_supply: Clean up wm97xx_battery warnings

PATCH Applied Mark Brown 3 participants 3 messages Jan 27, 2010 – Jan 29, 2010

lore
Share & tools
lore

Mark Brown

author
#0 lore raw

PATCH 1/1 power_supply: Clean up wm97xx_battery warnings

Staticise work_lock (nothing outside the driver has any reason to see it) and specify dev when requesting the charger IRQ (since that's what we pass in when we free it).

---
 drivers/power/wm97xx_battery.c |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)
drivers/power/wm97xx_battery.c +2 -2
index 6ea3cb5..23eed35 100644
@@ -26,7 +26,7 @@
 
 static DEFINE_MUTEX(bat_lock);
 static struct work_struct bat_work;
-struct mutex work_lock;
+static struct mutex work_lock;
 static int bat_status = POWER_SUPPLY_STATUS_UNKNOWN;
 static struct wm97xx_batt_info *gpdata;
 static enum power_supply_property *prop;
@@ -203,7 +203,7 @@ static int __devinit wm97xx_bat_probe(struct platform_device *dev)
 			goto err2;
 		ret = request_irq(gpio_to_irq(pdata->charge_gpio),
 				wm97xx_chrg_irq, IRQF_DISABLED,
-				"AC Detect", 0);
+				"AC Detect", dev);
 		if (ret)
 			goto err2;
 		props++;	/* POWER_SUPPLY_PROP_STATUS */
Signature · 1 line
1.6.6
Acked-by on v1 1/1
#1 lore raw

Dne St 27. ledna 2010 21:45:35 Mark Brown napsal(a):

Quoted 5 lines

Staticise work_lock (nothing outside the driver has any reason to see it) and specify dev when requesting the charger IRQ (since that's what we pass in when we free it).

Hi, thanks.

Quoted 27 lines
---
 drivers/power/wm97xx_battery.c |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)
(quoted diff) +0 -0
 b/drivers/power/wm97xx_battery.c index 6ea3cb5..23eed35 100644
drivers/power/wm97xx_battery.c +2 -2
@@ -26,7 +26,7 @@
 
 static DEFINE_MUTEX(bat_lock);
 static struct work_struct bat_work;
-struct mutex work_lock;
+static struct mutex work_lock;
 static int bat_status = POWER_SUPPLY_STATUS_UNKNOWN;
 static struct wm97xx_batt_info *gpdata;
 static enum power_supply_property *prop;
@@ -203,7 +203,7 @@ static int __devinit wm97xx_bat_probe(struct
 platform_device *dev) goto err2;
 		ret = request_irq(gpio_to_irq(pdata->charge_gpio),
 				wm97xx_chrg_irq, IRQF_DISABLED,
-				"AC Detect", 0);
+				"AC Detect", dev);
 		if (ret)
 			goto err2;
 		props++;	/* POWER_SUPPLY_PROP_STATUS */
#2 lore raw
Quoted 10 lines · Marek Vasut

Dne St 27. ledna 2010 21:45:35 Mark Brown napsal(a):

Quoted 5 lines

Staticise work_lock (nothing outside the driver has any reason to see it) and specify dev when requesting the charger IRQ (since that's what we pass in when we free it).

Hi, thanks.

Applied to battery-2.6 (for 2.6.34). Thanks!