From 127d2868484b9769e08a8353e9e43023dcb8b9b3 Mon Sep 17 00:00:00 2001 From: Geliang Tang Date: Fri, 1 Jan 2016 22:59:11 +0800 Subject: [PATCH] power: generic-adc-battery: use to_delayed_work Use to_delayed_work() instead of open-coding it. Signed-off-by: Geliang Tang Signed-off-by: Sebastian Reichel --- drivers/power/generic-adc-battery.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/power/generic-adc-battery.c b/drivers/power/generic-adc-battery.c index fedc5818fab7..edb36bf781b0 100644 --- a/drivers/power/generic-adc-battery.c +++ b/drivers/power/generic-adc-battery.c @@ -206,7 +206,7 @@ static void gab_work(struct work_struct *work) bool is_plugged; int status; - delayed_work = container_of(work, struct delayed_work, work); + delayed_work = to_delayed_work(work); adc_bat = container_of(delayed_work, struct gab, bat_work); pdata = adc_bat->pdata; status = adc_bat->status; -- 2.20.1