From: Geliang Tang Date: Fri, 1 Jan 2016 14:59:11 +0000 (+0800) Subject: power: generic-adc-battery: use to_delayed_work X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=127d2868484b9769e08a8353e9e43023dcb8b9b3;p=GitHub%2FLineageOS%2FG12%2Fandroid_kernel_amlogic_linux-4.9.git 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 --- 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;