summaryrefslogtreecommitdiff
path: root/drivers/power/supply/s3c_adc_battery.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/power/supply/s3c_adc_battery.c')
-rw-r--r--drivers/power/supply/s3c_adc_battery.c21
1 files changed, 6 insertions, 15 deletions
diff --git a/drivers/power/supply/s3c_adc_battery.c b/drivers/power/supply/s3c_adc_battery.c
index a2addc24ee8b..68d31a3bee48 100644
--- a/drivers/power/supply/s3c_adc_battery.c
+++ b/drivers/power/supply/s3c_adc_battery.c
@@ -1,13 +1,8 @@
-/*
- * iPAQ h1930/h1940/rx1950 battery controller driver
- * Copyright (c) Vasily Khoruzhick
- * Based on h1940_battery.c by Arnaud Patard
- *
- * This file is subject to the terms and conditions of the GNU General Public
- * License. See the file COPYING in the main directory of this archive for
- * more details.
- *
- */
+// SPDX-License-Identifier: GPL-2.0
+//
+// iPAQ h1930/h1940/rx1950 battery controller driver
+// Copyright (c) Vasily Khoruzhick
+// Based on h1940_battery.c by Arnaud Patard
#include <linux/interrupt.h>
#include <linux/platform_device.h>
@@ -395,7 +390,7 @@ static int s3c_adc_bat_remove(struct platform_device *pdev)
if (main_bat.charge_finished)
free_irq(gpiod_to_irq(main_bat.charge_finished), NULL);
- cancel_delayed_work(&bat_work);
+ cancel_delayed_work_sync(&bat_work);
if (pdata->exit)
pdata->exit();
@@ -407,8 +402,6 @@ static int s3c_adc_bat_remove(struct platform_device *pdev)
static int s3c_adc_bat_suspend(struct platform_device *pdev,
pm_message_t state)
{
- struct s3c_adc_bat_pdata *pdata = pdev->dev.platform_data;
-
if (main_bat.charge_finished) {
if (device_may_wakeup(&pdev->dev))
enable_irq_wake(
@@ -424,8 +417,6 @@ static int s3c_adc_bat_suspend(struct platform_device *pdev,
static int s3c_adc_bat_resume(struct platform_device *pdev)
{
- struct s3c_adc_bat_pdata *pdata = pdev->dev.platform_data;
-
if (main_bat.charge_finished) {
if (device_may_wakeup(&pdev->dev))
disable_irq_wake(