summaryrefslogtreecommitdiffstats
path: root/drivers/power
diff options
context:
space:
mode:
authorAxel Lin <axel.lin@gmail.com>2011-11-28 22:37:35 +0800
committerAnton Vorontsov <cbouatmailru@gmail.com>2012-01-06 05:00:30 +0400
commitdaf22c3c4444e10a852a2f460f5cb1a43038bd53 (patch)
tree6762def93163d68fcfa1d548d357f75936b45e9c /drivers/power
parent68597986f7db9abbe380af3db6a34b6c83cdf302 (diff)
downloadtalos-op-linux-daf22c3c4444e10a852a2f460f5cb1a43038bd53.tar.gz
talos-op-linux-daf22c3c4444e10a852a2f460f5cb1a43038bd53.zip
wm97xx_battery: Use DEFINE_MUTEX() for work_lock
work_lock can be initialized automatically with DEFINE_MUTEX() rather than explicitly calling mutex_init(). This patch also removes an unused bat_lock mutex. Signed-off-by: Axel Lin <axel.lin@gmail.com> Signed-off-by: Anton Vorontsov <cbouatmailru@gmail.com>
Diffstat (limited to 'drivers/power')
-rw-r--r--drivers/power/wm97xx_battery.c5
1 files changed, 1 insertions, 4 deletions
diff --git a/drivers/power/wm97xx_battery.c b/drivers/power/wm97xx_battery.c
index 199818f9d181..d2d4c08c681c 100644
--- a/drivers/power/wm97xx_battery.c
+++ b/drivers/power/wm97xx_battery.c
@@ -25,9 +25,8 @@
#include <linux/irq.h>
#include <linux/slab.h>
-static DEFINE_MUTEX(bat_lock);
static struct work_struct bat_work;
-static struct mutex work_lock;
+static DEFINE_MUTEX(work_lock);
static int bat_status = POWER_SUPPLY_STATUS_UNKNOWN;
static enum power_supply_property *prop;
@@ -181,8 +180,6 @@ static int __devinit wm97xx_bat_probe(struct platform_device *dev)
if (dev->id != -1)
return -EINVAL;
- mutex_init(&work_lock);
-
if (!pdata) {
dev_err(&dev->dev, "No platform_data supplied\n");
return -EINVAL;
OpenPOWER on IntegriCloud