diff mbox series

[3/4] PCI: al: Remove device * in struct

Message ID e1c097ef8ef4e42b2fd94a327ce5af2bc2bac991.1637533108.git.ffclaire1224@gmail.com (mailing list archive)
State Changes Requested
Delegated to: Bjorn Helgaas
Headers show
Series Remove device * in struct | expand

Commit Message

Fan Fei Nov. 23, 2021, 3:38 p.m. UTC
Remove "device *dev" in struct al_pcie because it refers struct dw_pcie,
which contains a "device *dev" already.

Signed-off-by: Fan Fei <ffclaire1224@gmail.com>
---
 drivers/pci/controller/dwc/pcie-al.c | 10 ++++------
 1 file changed, 4 insertions(+), 6 deletions(-)
diff mbox series

Patch

diff --git a/drivers/pci/controller/dwc/pcie-al.c b/drivers/pci/controller/dwc/pcie-al.c
index e8afa50129a8..f4b7bcda6b2d 100644
--- a/drivers/pci/controller/dwc/pcie-al.c
+++ b/drivers/pci/controller/dwc/pcie-al.c
@@ -130,7 +130,6 @@  struct al_pcie_target_bus_cfg {
 struct al_pcie {
 	struct dw_pcie *pci;
 	void __iomem *controller_base; /* base of PCIe unit (not DW core) */
-	struct device *dev;
 	resource_size_t ecam_size;
 	unsigned int controller_rev_id;
 	struct al_pcie_reg_offsets reg_offsets;
@@ -171,12 +170,12 @@  static int al_pcie_rev_id_get(struct al_pcie *pcie, unsigned int *rev_id)
 		*rev_id = AL_PCIE_REV_ID_4;
 		break;
 	default:
-		dev_err(pcie->dev, "Unsupported dev_id_val (0x%x)\n",
+		dev_err(pcie->pci->dev, "Unsupported dev_id_val (0x%x)\n",
 			dev_id_val);
 		return -EINVAL;
 	}
 
-	dev_dbg(pcie->dev, "dev_id_val: 0x%x\n", dev_id_val);
+	dev_dbg(pcie->pci->dev, "dev_id_val: 0x%x\n", dev_id_val);
 
 	return 0;
 }
@@ -192,7 +191,7 @@  static int al_pcie_reg_offsets_set(struct al_pcie *pcie)
 		pcie->reg_offsets.ob_ctrl = OB_CTRL_REV3_5_OFFSET;
 		break;
 	default:
-		dev_err(pcie->dev, "Unsupported controller rev_id: 0x%x\n",
+		dev_err(pcie->pci->dev, "Unsupported controller rev_id: 0x%x\n",
 			pcie->controller_rev_id);
 		return -EINVAL;
 	}
@@ -258,7 +257,7 @@  static void al_pcie_config_prepare(struct al_pcie *pcie)
 
 	ecam_bus_mask = (pcie->ecam_size >> PCIE_ECAM_BUS_SHIFT) - 1;
 	if (ecam_bus_mask > 255) {
-		dev_warn(pcie->dev, "ECAM window size is larger than 256MB. Cutting off at 256\n");
+		dev_warn(pcie->pci->dev, "ECAM window size is larger than 256MB. Cutting off at 256\n");
 		ecam_bus_mask = 255;
 	}
 
@@ -334,7 +333,6 @@  static int al_pcie_probe(struct platform_device *pdev)
 	pci->pp.ops = &al_pcie_host_ops;
 
 	al_pcie->pci = pci;
-	al_pcie->dev = dev;
 
 	ecam_res = platform_get_resource_byname(pdev, IORESOURCE_MEM, "config");
 	if (!ecam_res) {