]> git.ipfire.org Git - thirdparty/linux.git/commitdiff
PCI: ls-gen4: Use to_delayed_work()
authorChen Ni <nichen@iscas.ac.cn>
Mon, 14 Apr 2025 07:42:41 +0000 (15:42 +0800)
committerManivannan Sadhasivam <manivannan.sadhasivam@linaro.org>
Sun, 27 Apr 2025 16:34:25 +0000 (22:04 +0530)
Use to_delayed_work() instead of open-coding it.

Signed-off-by: Chen Ni <nichen@iscas.ac.cn>
Signed-off-by: Manivannan Sadhasivam <manivannan.sadhasivam@linaro.org>
Link: https://patch.msgid.link/20250414074241.3954081-1-nichen@iscas.ac.cn
drivers/pci/controller/mobiveil/pcie-layerscape-gen4.c

index 5af22bee913bdc7e7cba4e123a202913d930f8f1..09dff6bf824fae980fe6f425969be42fd56a1227 100644 (file)
@@ -174,8 +174,7 @@ static int ls_g4_pcie_interrupt_init(struct mobiveil_pcie *mv_pci)
 
 static void ls_g4_pcie_reset(struct work_struct *work)
 {
-       struct delayed_work *dwork = container_of(work, struct delayed_work,
-                                                 work);
+       struct delayed_work *dwork = to_delayed_work(work);
        struct ls_g4_pcie *pcie = container_of(dwork, struct ls_g4_pcie, dwork);
        struct mobiveil_pcie *mv_pci = &pcie->pci;
        u16 ctrl;