power: generic-adc-battery: use to_delayed_work
authorGeliang Tang <geliangtang@163.com>
Fri, 1 Jan 2016 14:59:11 +0000 (22:59 +0800)
committerSebastian Reichel <sre@kernel.org>
Thu, 7 Jan 2016 15:38:31 +0000 (16:38 +0100)
Use to_delayed_work() instead of open-coding it.

Signed-off-by: Geliang Tang <geliangtang@163.com>
Signed-off-by: Sebastian Reichel <sre@kernel.org>
drivers/power/generic-adc-battery.c

index fedc5818fab7b74b96b5da2f81b77d4a992c6baf..edb36bf781b0cb0bb0856b72ab91b2aa8e33aaa4 100644 (file)
@@ -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;