char: xillybus: Use to_delayed_work()
authorChen Ni <nichen@iscas.ac.cn>
Mon, 14 Apr 2025 07:45:59 +0000 (15:45 +0800)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 17 Apr 2025 08:56:11 +0000 (10:56 +0200)
Use to_delayed_work() instead of open-coding it.

Signed-off-by: Chen Ni <nichen@iscas.ac.cn>
Acked-by: Eli Billauer <eli.billauer@gmail.com>
Link: https://lore.kernel.org/r/20250414074559.3954142-1-nichen@iscas.ac.cn
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/char/xillybus/xillybus_core.c

index 11b7c47492742ebc2d38e29557cd1ec71978ef26..efb1ae834265ad10ab6f4ea4eb87ac7cdc022e85 100644 (file)
@@ -1184,8 +1184,7 @@ static int xillybus_flush(struct file *filp, fl_owner_t id)
 
 static void xillybus_autoflush(struct work_struct *work)
 {
-       struct delayed_work *workitem = container_of(
-               work, struct delayed_work, work);
+       struct delayed_work *workitem = to_delayed_work(work);
        struct xilly_channel *channel = container_of(
                workitem, struct xilly_channel, rd_workitem);
        int rc;