Port of a Linux commit 4ab2e7c0df6b8bbc6c8ea1617b737d33c2510012

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

  Signed-off-by: Jisheng Zhang <jszh...@marvell.com>
  Signed-off-by: Bjorn Helgaas <bhelg...@google.com>
  Acked-by: Jingoo Han <jingooh...@gmail.com>
  Acked-by: Kishon Vijay Abraham I <kis...@ti.com>

Signed-off-by: Andrey Smirnov <andrew.smir...@gmail.com>
---
 drivers/pci/pci-imx6.c        | 2 +-
 drivers/pci/pcie-designware.h | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/pci/pci-imx6.c b/drivers/pci/pci-imx6.c
index 1807f29c9..38e002a1c 100644
--- a/drivers/pci/pci-imx6.c
+++ b/drivers/pci/pci-imx6.c
@@ -501,7 +501,7 @@ static const struct dw_pcie_ops dw_pcie_ops = {
        .link_up = imx6_pcie_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,
 };
 
diff --git a/drivers/pci/pcie-designware.h b/drivers/pci/pcie-designware.h
index 0f1659319..058a0acbb 100644
--- a/drivers/pci/pcie-designware.h
+++ b/drivers/pci/pcie-designware.h
@@ -129,7 +129,7 @@ struct pcie_port {
        struct resource         mem;
        struct resource         busn;
        int                     irq;
-       struct dw_pcie_host_ops *ops;
+       const struct dw_pcie_host_ops   *ops;
        struct pci_controller   pci;
 };
 
-- 
2.19.1


_______________________________________________
barebox mailing list
barebox@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox

Reply via email to