PCI: dwc: Drop host prefix from struct dw_pcie_host_ops members
authorYoshihiro Shimoda <yoshihiro.shimoda.uh@renesas.com>
Wed, 20 Dec 2023 05:38:24 +0000 (14:38 +0900)
committerKrzysztof Wilczyński <kwilczynski@kernel.org>
Sat, 6 Jan 2024 07:51:08 +0000 (07:51 +0000)
Since the name of the dw_pcie_host_ops struct makes it obvious that it's
for the PCIe Host, drop the host prefix from the struct members.

[kwilczynski: commit log]
Suggested-by: Serge Semin <fancer.lancer@gmail.com>
Link: https://lore.kernel.org/linux-pci/20231220053829.1921187-2-yoshihiro.shimoda.uh@renesas.com
Signed-off-by: Yoshihiro Shimoda <yoshihiro.shimoda.uh@renesas.com>
Signed-off-by: Krzysztof Wilczyński <kwilczynski@kernel.org>
Reviewed-by: Manivannan Sadhasivam <manivannan.sadhasivam@linaro.org>
Reviewed-by: Serge Semin <fancer.lancer@gmail.com>
Reviewed-by: Thomas Petazzoni <thomas.petazzoni@bootlin.com>
Acked-by: Heiko Stuebner <heiko@sntech.de>
Acked-by: Jesper Nilsson <jesper.nilsson@axis.com>
Acked-by: Kunihiko Hayashi <hayashi.kunihiko@socionext.com>
Acked-by: Lei Chuanhua <lchuanhua@maxlinear.com>
Acked-by: Nobuhiro Iwamatsu <nobuhiro1.iwamatsu@toshiba.co.jp>
23 files changed:
drivers/pci/controller/dwc/pci-dra7xx.c
drivers/pci/controller/dwc/pci-exynos.c
drivers/pci/controller/dwc/pci-imx6.c
drivers/pci/controller/dwc/pci-keystone.c
drivers/pci/controller/dwc/pci-layerscape.c
drivers/pci/controller/dwc/pci-meson.c
drivers/pci/controller/dwc/pcie-al.c
drivers/pci/controller/dwc/pcie-armada8k.c
drivers/pci/controller/dwc/pcie-artpec6.c
drivers/pci/controller/dwc/pcie-bt1.c
drivers/pci/controller/dwc/pcie-designware-host.c
drivers/pci/controller/dwc/pcie-designware.h
drivers/pci/controller/dwc/pcie-dw-rockchip.c
drivers/pci/controller/dwc/pcie-fu740.c
drivers/pci/controller/dwc/pcie-histb.c
drivers/pci/controller/dwc/pcie-intel-gw.c
drivers/pci/controller/dwc/pcie-kirin.c
drivers/pci/controller/dwc/pcie-qcom.c
drivers/pci/controller/dwc/pcie-rcar-gen4.c
drivers/pci/controller/dwc/pcie-spear13xx.c
drivers/pci/controller/dwc/pcie-tegra194.c
drivers/pci/controller/dwc/pcie-uniphier.c
drivers/pci/controller/dwc/pcie-visconti.c

index b445ffe95e3f044576bf0b819b6584a44f556bea..6125a838f4b1de51b008bacf9ea18f1276548920 100644 (file)
@@ -371,7 +371,7 @@ static int dra7xx_pcie_init_irq_domain(struct dw_pcie_rp *pp)
 }
 
 static const struct dw_pcie_host_ops dra7xx_pcie_host_ops = {
-       .host_init = dra7xx_pcie_host_init,
+       .init = dra7xx_pcie_host_init,
 };
 
 static void dra7xx_pcie_ep_init(struct dw_pcie_ep *ep)
index c6bede3469320ed73de89eac502ca8f99e047455..673ae213203fc3058dc71602b16d87ee85ed8ac6 100644 (file)
@@ -268,7 +268,7 @@ static int exynos_pcie_host_init(struct dw_pcie_rp *pp)
 }
 
 static const struct dw_pcie_host_ops exynos_pcie_host_ops = {
-       .host_init = exynos_pcie_host_init,
+       .init = exynos_pcie_host_init,
 };
 
 static int exynos_add_pcie_port(struct exynos_pcie *ep,
index 74703362aeec718f8b408790ebf0083bdd968d5c..b02f6f14a4117adb35e85bc867099e17bd2da1bf 100644 (file)
@@ -1039,8 +1039,8 @@ static void imx6_pcie_host_exit(struct dw_pcie_rp *pp)
 }
 
 static const struct dw_pcie_host_ops imx6_pcie_host_ops = {
-       .host_init = imx6_pcie_host_init,
-       .host_deinit = imx6_pcie_host_exit,
+       .init = imx6_pcie_host_init,
+       .deinit = imx6_pcie_host_exit,
 };
 
 static const struct dw_pcie_ops dw_pcie_ops = {
index 0def919f89fafb51bc28109d26d23893506b804f..3711347ddc872e29dc5f805872c80fe627502df6 100644 (file)
@@ -838,12 +838,12 @@ static int __init ks_pcie_host_init(struct dw_pcie_rp *pp)
 }
 
 static const struct dw_pcie_host_ops ks_pcie_host_ops = {
-       .host_init = ks_pcie_host_init,
-       .msi_host_init = ks_pcie_msi_host_init,
+       .init = ks_pcie_host_init,
+       .msi_init = ks_pcie_msi_host_init,
 };
 
 static const struct dw_pcie_host_ops ks_pcie_am654_host_ops = {
-       .host_init = ks_pcie_host_init,
+       .init = ks_pcie_host_init,
 };
 
 static irqreturn_t ks_pcie_err_irq_handler(int irq, void *priv)
index 37956e09c65bd51c95937e25b982f6e00a0491d4..0c3d7ef729cb6775216e92bedb2c46dd797c4837 100644 (file)
@@ -169,7 +169,7 @@ static int ls_pcie_host_init(struct dw_pcie_rp *pp)
 }
 
 static const struct dw_pcie_host_ops ls_pcie_host_ops = {
-       .host_init = ls_pcie_host_init,
+       .init = ls_pcie_host_init,
        .pme_turn_off = ls_pcie_send_turnoff_msg,
 };
 
index 407558f5d74acdb730105b25f3452422fe9e9a33..6477c83262c20632d91a22349a2082e8327d1b65 100644 (file)
@@ -389,7 +389,7 @@ static int meson_pcie_host_init(struct dw_pcie_rp *pp)
 }
 
 static const struct dw_pcie_host_ops meson_pcie_host_ops = {
-       .host_init = meson_pcie_host_init,
+       .init = meson_pcie_host_init,
 };
 
 static const struct dw_pcie_ops dw_pcie_ops = {
index b8cb77c9c4bd2c86498ffa6c7089935bb3b5292f..6dfdda59f32836a21b10b4c6f88d3746d1e1462a 100644 (file)
@@ -311,7 +311,7 @@ static int al_pcie_host_init(struct dw_pcie_rp *pp)
 }
 
 static const struct dw_pcie_host_ops al_pcie_host_ops = {
-       .host_init = al_pcie_host_init,
+       .init = al_pcie_host_init,
 };
 
 static int al_pcie_probe(struct platform_device *pdev)
index 5c999e15c357f0a598d631d094afb3818dd708d0..b5c599ccaacf0c4d1e834582dc4c97deb43114c6 100644 (file)
@@ -225,7 +225,7 @@ static irqreturn_t armada8k_pcie_irq_handler(int irq, void *arg)
 }
 
 static const struct dw_pcie_host_ops armada8k_pcie_host_ops = {
-       .host_init = armada8k_pcie_host_init,
+       .init = armada8k_pcie_host_init,
 };
 
 static int armada8k_add_pcie_port(struct armada8k_pcie *pcie,
index 9b572a2b2c9a54cac43ef0afeb888133505d0d7d..2f32fcd8933c74ba618c2bb75fde5204101abfcf 100644 (file)
@@ -333,7 +333,7 @@ static int artpec6_pcie_host_init(struct dw_pcie_rp *pp)
 }
 
 static const struct dw_pcie_host_ops artpec6_pcie_host_ops = {
-       .host_init = artpec6_pcie_host_init,
+       .init = artpec6_pcie_host_init,
 };
 
 static void artpec6_pcie_ep_init(struct dw_pcie_ep *ep)
index 17e696797ff50f92116190059310a4e0ae8e170e..76d0ddea80075716a796c5d625cdd51f8cd8afd2 100644 (file)
@@ -559,8 +559,8 @@ static void bt1_pcie_host_deinit(struct dw_pcie_rp *pp)
 }
 
 static const struct dw_pcie_host_ops bt1_pcie_host_ops = {
-       .host_init = bt1_pcie_host_init,
-       .host_deinit = bt1_pcie_host_deinit,
+       .init = bt1_pcie_host_init,
+       .deinit = bt1_pcie_host_deinit,
 };
 
 static struct bt1_pcie *bt1_pcie_create_data(struct platform_device *pdev)
index 7991f0e179b215a46726f6d8f2693409d49358a5..d5fc31f8345f70f587a2052db681f3b023d08b59 100644 (file)
@@ -441,14 +441,14 @@ int dw_pcie_host_init(struct dw_pcie_rp *pp)
        bridge->ops = &dw_pcie_ops;
        bridge->child_ops = &dw_child_pcie_ops;
 
-       if (pp->ops->host_init) {
-               ret = pp->ops->host_init(pp);
+       if (pp->ops->init) {
+               ret = pp->ops->init(pp);
                if (ret)
                        return ret;
        }
 
        if (pci_msi_enabled()) {
-               pp->has_msi_ctrl = !(pp->ops->msi_host_init ||
+               pp->has_msi_ctrl = !(pp->ops->msi_init ||
                                     of_property_read_bool(np, "msi-parent") ||
                                     of_property_read_bool(np, "msi-map"));
 
@@ -464,8 +464,8 @@ int dw_pcie_host_init(struct dw_pcie_rp *pp)
                        goto err_deinit_host;
                }
 
-               if (pp->ops->msi_host_init) {
-                       ret = pp->ops->msi_host_init(pp);
+               if (pp->ops->msi_init) {
+                       ret = pp->ops->msi_init(pp);
                        if (ret < 0)
                                goto err_deinit_host;
                } else if (pp->has_msi_ctrl) {
@@ -502,8 +502,8 @@ int dw_pcie_host_init(struct dw_pcie_rp *pp)
        if (ret)
                goto err_stop_link;
 
-       if (pp->ops->host_post_init)
-               pp->ops->host_post_init(pp);
+       if (pp->ops->post_init)
+               pp->ops->post_init(pp);
 
        return 0;
 
@@ -518,8 +518,8 @@ err_free_msi:
                dw_pcie_free_msi(pp);
 
 err_deinit_host:
-       if (pp->ops->host_deinit)
-               pp->ops->host_deinit(pp);
+       if (pp->ops->deinit)
+               pp->ops->deinit(pp);
 
        return ret;
 }
@@ -539,8 +539,8 @@ void dw_pcie_host_deinit(struct dw_pcie_rp *pp)
        if (pp->has_msi_ctrl)
                dw_pcie_free_msi(pp);
 
-       if (pp->ops->host_deinit)
-               pp->ops->host_deinit(pp);
+       if (pp->ops->deinit)
+               pp->ops->deinit(pp);
 }
 EXPORT_SYMBOL_GPL(dw_pcie_host_deinit);
 
@@ -842,8 +842,8 @@ int dw_pcie_suspend_noirq(struct dw_pcie *pci)
                return ret;
        }
 
-       if (pci->pp.ops->host_deinit)
-               pci->pp.ops->host_deinit(&pci->pp);
+       if (pci->pp.ops->deinit)
+               pci->pp.ops->deinit(&pci->pp);
 
        pci->suspended = true;
 
@@ -860,8 +860,8 @@ int dw_pcie_resume_noirq(struct dw_pcie *pci)
 
        pci->suspended = false;
 
-       if (pci->pp.ops->host_init) {
-               ret = pci->pp.ops->host_init(&pci->pp);
+       if (pci->pp.ops->init) {
+               ret = pci->pp.ops->init(&pci->pp);
                if (ret) {
                        dev_err(pci->dev, "Host init failed: %d\n", ret);
                        return ret;
index 55ff76e3d384665fda4f538b3bc71c711a51d4c4..5c4518ad1bec9a293034729edaf6227b0556f33b 100644 (file)
@@ -300,10 +300,10 @@ enum dw_pcie_ltssm {
 };
 
 struct dw_pcie_host_ops {
-       int (*host_init)(struct dw_pcie_rp *pp);
-       void (*host_deinit)(struct dw_pcie_rp *pp);
-       void (*host_post_init)(struct dw_pcie_rp *pp);
-       int (*msi_host_init)(struct dw_pcie_rp *pp);
+       int (*init)(struct dw_pcie_rp *pp);
+       void (*deinit)(struct dw_pcie_rp *pp);
+       void (*post_init)(struct dw_pcie_rp *pp);
+       int (*msi_init)(struct dw_pcie_rp *pp);
        void (*pme_turn_off)(struct dw_pcie_rp *pp);
 };
 
index 2fe42c70097fdbae7a733f500e3e9f6a0e800448..961dabcb1ec8a95fdf8bfc5079bc02e7e8ffe934 100644 (file)
@@ -215,7 +215,7 @@ static int rockchip_pcie_host_init(struct dw_pcie_rp *pp)
 }
 
 static const struct dw_pcie_host_ops rockchip_pcie_host_ops = {
-       .host_init = rockchip_pcie_host_init,
+       .init = rockchip_pcie_host_init,
 };
 
 static int rockchip_pcie_clk_init(struct rockchip_pcie *rockchip)
index 1e9b44b8bba48e8930c2ae8de101356f0339b729..66367252032b84fd42c719287057471b1fe44e9a 100644 (file)
@@ -279,7 +279,7 @@ static int fu740_pcie_host_init(struct dw_pcie_rp *pp)
 }
 
 static const struct dw_pcie_host_ops fu740_pcie_host_ops = {
-       .host_init = fu740_pcie_host_init,
+       .init = fu740_pcie_host_init,
 };
 
 static const struct dw_pcie_ops dw_pcie_ops = {
index fd484cc7c481dc8e54efeb4e469350aae80bcb7d..7a11c618b9d9c46a851ca71eb10a88681d9e0892 100644 (file)
@@ -198,7 +198,7 @@ static int histb_pcie_host_init(struct dw_pcie_rp *pp)
 }
 
 static const struct dw_pcie_host_ops histb_pcie_host_ops = {
-       .host_init = histb_pcie_host_init,
+       .init = histb_pcie_host_init,
 };
 
 static void histb_pcie_host_disable(struct histb_pcie *hipcie)
index c9c93524e01dc393a35f0219b1f580ba69a9506e..be52e9db44af6a3ca3e010714e3a58f2259f6d0c 100644 (file)
@@ -391,7 +391,7 @@ static const struct dw_pcie_ops intel_pcie_ops = {
 };
 
 static const struct dw_pcie_host_ops intel_pcie_dw_ops = {
-       .host_init =            intel_pcie_rc_init,
+       .init =         intel_pcie_rc_init,
 };
 
 static int intel_pcie_probe(struct platform_device *pdev)
index 2ee146767971c3d41af3e9e3916c6a3f29090afc..c50e183f88d62c28ed8ef958142d78edbae39f9e 100644 (file)
@@ -672,7 +672,7 @@ static const struct dw_pcie_ops kirin_dw_pcie_ops = {
 };
 
 static const struct dw_pcie_host_ops kirin_pcie_host_ops = {
-       .host_init = kirin_pcie_host_init,
+       .init = kirin_pcie_host_init,
 };
 
 static int kirin_pcie_power_off(struct kirin_pcie *kirin_pcie)
index 6902e97719d1366d754c20f3d28a0482db48500e..cd986f50ec4a481141737b9c30e6a917931ad0b8 100644 (file)
@@ -1244,9 +1244,9 @@ static void qcom_pcie_host_post_init(struct dw_pcie_rp *pp)
 }
 
 static const struct dw_pcie_host_ops qcom_pcie_dw_ops = {
-       .host_init      = qcom_pcie_host_init,
-       .host_deinit    = qcom_pcie_host_deinit,
-       .host_post_init = qcom_pcie_host_post_init,
+       .init           = qcom_pcie_host_init,
+       .deinit         = qcom_pcie_host_deinit,
+       .post_init      = qcom_pcie_host_post_init,
 };
 
 /* Qcom IP rev.: 2.1.0 Synopsys IP rev.: 4.01a */
index 3bc45e513b3d53a84acab1266942b6ffb86844ff..193ed88d3c2f3dd265eccc4c7e245e4cec8aa233 100644 (file)
@@ -307,8 +307,8 @@ static void rcar_gen4_pcie_host_deinit(struct dw_pcie_rp *pp)
 }
 
 static const struct dw_pcie_host_ops rcar_gen4_pcie_host_ops = {
-       .host_init = rcar_gen4_pcie_host_init,
-       .host_deinit = rcar_gen4_pcie_host_deinit,
+       .init = rcar_gen4_pcie_host_init,
+       .deinit = rcar_gen4_pcie_host_deinit,
 };
 
 static int rcar_gen4_add_dw_pcie_rp(struct rcar_gen4_pcie *rcar)
index 99d47ae80331f4662087c1fb2cb1ff9b4399b27b..201dced209f0822fcd7faebbca2a7686bf016c8d 100644 (file)
@@ -148,7 +148,7 @@ static int spear13xx_pcie_host_init(struct dw_pcie_rp *pp)
 }
 
 static const struct dw_pcie_host_ops spear13xx_pcie_host_ops = {
-       .host_init = spear13xx_pcie_host_init,
+       .init = spear13xx_pcie_host_init,
 };
 
 static int spear13xx_add_pcie_port(struct spear13xx_pcie *spear13xx_pcie,
index 0fe113598ebbc766566b0db805a29bd3fa9910ef..52e26ed61380e6a5f514c40ecf7b071235e2b7f5 100644 (file)
@@ -1060,7 +1060,7 @@ static const struct dw_pcie_ops tegra_dw_pcie_ops = {
 };
 
 static const struct dw_pcie_host_ops tegra_pcie_dw_host_ops = {
-       .host_init = tegra_pcie_dw_host_init,
+       .init = tegra_pcie_dw_host_init,
 };
 
 static void tegra_pcie_disable_phy(struct tegra_pcie_dw *pcie)
index 48c3eba817b43cae49b887be2c95a2bec63dfdb8..354fb3bd0a192b1ab5159cdcab953cbc28c785ad 100644 (file)
@@ -311,7 +311,7 @@ static int uniphier_pcie_host_init(struct dw_pcie_rp *pp)
 }
 
 static const struct dw_pcie_host_ops uniphier_pcie_host_ops = {
-       .host_init = uniphier_pcie_host_init,
+       .init = uniphier_pcie_host_init,
 };
 
 static int uniphier_pcie_host_enable(struct uniphier_pcie *pcie)
index 71026fefa36680a2e7ebd230db84488d87d63f04..318c278e65c898fd6a1675956403a8ad3f71db78 100644 (file)
@@ -236,7 +236,7 @@ static int visconti_pcie_host_init(struct dw_pcie_rp *pp)
 }
 
 static const struct dw_pcie_host_ops visconti_pcie_host_ops = {
-       .host_init = visconti_pcie_host_init,
+       .init = visconti_pcie_host_init,
 };
 
 static int visconti_get_resources(struct platform_device *pdev,