[PATCH] PCI: ls-gen4: Use to_delayed_work()

Chen Ni nichen at iscas.ac.cn
Mon Apr 14 00:42:41 PDT 2025


Use to_delayed_work() instead of open-coding it.

Signed-off-by: Chen Ni <nichen at iscas.ac.cn>
---
 drivers/pci/controller/mobiveil/pcie-layerscape-gen4.c | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/drivers/pci/controller/mobiveil/pcie-layerscape-gen4.c b/drivers/pci/controller/mobiveil/pcie-layerscape-gen4.c
index 5af22bee913b..09dff6bf824f 100644
--- a/drivers/pci/controller/mobiveil/pcie-layerscape-gen4.c
+++ b/drivers/pci/controller/mobiveil/pcie-layerscape-gen4.c
@@ -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;
-- 
2.25.1




More information about the linux-arm-kernel mailing list