PCI: histb: Constify dw_pcie_host_ops structure
authorJulia Lawall <Julia.Lawall@lip6.fr>
Sat, 27 Oct 2018 18:31:19 +0000 (20:31 +0200)
committerLorenzo Pieralisi <lorenzo.pieralisi@arm.com>
Thu, 8 Nov 2018 13:54:44 +0000 (13:54 +0000)
The dw_pcie_host_ops structure is only stored in the ops field
of a pcie_port structure, and this field is const, so make the
dw_pcie_host_ops structure const as well.

Done with the help of Coccinelle.

Signed-off-by: Julia Lawall <Julia.Lawall@lip6.fr>
Signed-off-by: Lorenzo Pieralisi <lorenzo.pieralisi@arm.com>
Acked-by: Shawn Guo <shawn.guo@linaro.org>
drivers/pci/controller/dwc/pcie-histb.c

index 7b32e619b959c8697eb16287c9e7d547581d97fd..954bc2b74bbcd60727395ca523a5a4f98242c4a9 100644 (file)
@@ -202,7 +202,7 @@ static int histb_pcie_host_init(struct pcie_port *pp)
        return 0;
 }
 
-static struct dw_pcie_host_ops histb_pcie_host_ops = {
+static const struct dw_pcie_host_ops histb_pcie_host_ops = {
        .rd_own_conf = histb_pcie_rd_own_conf,
        .wr_own_conf = histb_pcie_wr_own_conf,
        .host_init = histb_pcie_host_init,