Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 4ab2e7c0 authored by Jisheng Zhang's avatar Jisheng Zhang Committed by Bjorn Helgaas
Browse files

PCI: dwc: Constify dw_pcie_host_ops structures



The dw_pcie_host_ops structures are never modified.  Constify these
structures such that these can be write-protected.

Signed-off-by: default avatarJisheng Zhang <jszhang@marvell.com>
Signed-off-by: default avatarBjorn Helgaas <bhelgaas@google.com>
Acked-by: default avatarJingoo Han <jingoohan1@gmail.com>
Acked-by: default avatarKishon Vijay Abraham I <kishon@ti.com>
parent 3eefa790
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -208,7 +208,7 @@ static void dra7xx_pcie_host_init(struct pcie_port *pp)
	dra7xx_pcie_enable_interrupts(dra7xx);
}

static struct dw_pcie_host_ops dra7xx_pcie_host_ops = {
static const struct dw_pcie_host_ops dra7xx_pcie_host_ops = {
	.host_init = dra7xx_pcie_host_init,
};

+1 −1
Original line number Diff line number Diff line
@@ -590,7 +590,7 @@ static void exynos_pcie_host_init(struct pcie_port *pp)
	exynos_pcie_enable_interrupts(ep);
}

static struct dw_pcie_host_ops exynos_pcie_host_ops = {
static const struct dw_pcie_host_ops exynos_pcie_host_ops = {
	.rd_own_conf = exynos_pcie_rd_own_conf,
	.wr_own_conf = exynos_pcie_wr_own_conf,
	.host_init = exynos_pcie_host_init,
+1 −1
Original line number Diff line number Diff line
@@ -602,7 +602,7 @@ static int imx6_pcie_link_up(struct dw_pcie *pci)
			PCIE_PHY_DEBUG_R1_XMLH_LINK_UP;
}

static struct dw_pcie_host_ops imx6_pcie_host_ops = {
static const struct dw_pcie_host_ops imx6_pcie_host_ops = {
	.host_init = imx6_pcie_host_init,
};

+1 −1
Original line number Diff line number Diff line
@@ -291,7 +291,7 @@ static void __init ks_pcie_host_init(struct pcie_port *pp)
			"Asynchronous external abort");
}

static struct dw_pcie_host_ops keystone_pcie_host_ops = {
static const struct dw_pcie_host_ops keystone_pcie_host_ops = {
	.rd_other_conf = ks_dw_pcie_rd_other_conf,
	.wr_other_conf = ks_dw_pcie_wr_other_conf,
	.host_init = ks_pcie_host_init,
+3 −3
Original line number Diff line number Diff line
@@ -39,7 +39,7 @@ struct ls_pcie_drvdata {
	u32 lut_offset;
	u32 ltssm_shift;
	u32 lut_dbg;
	struct dw_pcie_host_ops *ops;
	const struct dw_pcie_host_ops *ops;
	const struct dw_pcie_ops *dw_pcie_ops;
};

@@ -185,12 +185,12 @@ static int ls_pcie_msi_host_init(struct pcie_port *pp,
	return 0;
}

static struct dw_pcie_host_ops ls1021_pcie_host_ops = {
static const struct dw_pcie_host_ops ls1021_pcie_host_ops = {
	.host_init = ls1021_pcie_host_init,
	.msi_host_init = ls_pcie_msi_host_init,
};

static struct dw_pcie_host_ops ls_pcie_host_ops = {
static const struct dw_pcie_host_ops ls_pcie_host_ops = {
	.host_init = ls_pcie_host_init,
	.msi_host_init = ls_pcie_msi_host_init,
};
Loading