From mboxrd@z Thu Jan 1 00:00:00 1970 Return-path: Received: from mail-pl1-x641.google.com ([2607:f8b0:4864:20::641]) by casper.infradead.org with esmtps (Exim 4.90_1 #2 (Red Hat Linux)) id 1gXLBL-0008Ic-Df for barebox@lists.infradead.org; Thu, 13 Dec 2018 07:13:17 +0000 Received: by mail-pl1-x641.google.com with SMTP id 101so613481pld.6 for ; Wed, 12 Dec 2018 23:13:05 -0800 (PST) From: Andrey Smirnov Date: Wed, 12 Dec 2018 23:11:44 -0800 Message-Id: <20181213071144.31691-59-andrew.smirnov@gmail.com> In-Reply-To: <20181213071144.31691-1-andrew.smirnov@gmail.com> References: <20181213071144.31691-1-andrew.smirnov@gmail.com> MIME-Version: 1.0 List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "barebox" Errors-To: barebox-bounces+u.kleine-koenig=pengutronix.de@lists.infradead.org Subject: [PATCH 58/58] PCI: dwc: Constify dw_pcie_host_ops structures To: barebox@lists.infradead.org Cc: Andrey Smirnov 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 Signed-off-by: Bjorn Helgaas Acked-by: Jingoo Han Acked-by: Kishon Vijay Abraham I Signed-off-by: Andrey Smirnov --- 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 26b1ada94..226820158 100644 --- a/drivers/pci/pcie-designware.h +++ b/drivers/pci/pcie-designware.h @@ -108,7 +108,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