aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJulia Lawall <Julia.Lawall@lip6.fr>2018-01-02 08:28:00 -0500
committerLorenzo Pieralisi <lorenzo.pieralisi@arm.com>2018-01-03 13:16:08 -0500
commit8e64a7cce7b16e02e00eeb16f66909022b200da6 (patch)
tree88e9610e01690f09ce6754a72d7310685b81bbd6
parentc68febfd68e0f01d90da15bd10e94b42544f0f68 (diff)
PCI: qcom: Account for const type of of_device_id.data
This driver creates various const structures that it stores in the data field of an of_device_id array. Adding const to the declaration of the location that receives the const value from the data field ensures that the compiler will continue to check that the value is not modified. Furthermore, the const-discarding cast on the extraction from the data field is no longer needed. Done using Coccinelle. Signed-off-by: Julia Lawall <Julia.Lawall@lip6.fr> Signed-off-by: Lorenzo Pieralisi <lorenzo.pieralisi@arm.com> Acked-by: Stanimir Varbanov <svarbanov@mm-sol.com>
-rw-r--r--drivers/pci/dwc/pcie-qcom.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/pci/dwc/pcie-qcom.c b/drivers/pci/dwc/pcie-qcom.c
index ce7ba5b7552a..b3adc1074e9e 100644
--- a/drivers/pci/dwc/pcie-qcom.c
+++ b/drivers/pci/dwc/pcie-qcom.c
@@ -171,7 +171,7 @@ struct qcom_pcie {
171 union qcom_pcie_resources res; 171 union qcom_pcie_resources res;
172 struct phy *phy; 172 struct phy *phy;
173 struct gpio_desc *reset; 173 struct gpio_desc *reset;
174 struct qcom_pcie_ops *ops; 174 const struct qcom_pcie_ops *ops;
175}; 175};
176 176
177#define to_qcom_pcie(x) dev_get_drvdata((x)->dev) 177#define to_qcom_pcie(x) dev_get_drvdata((x)->dev)
@@ -1234,7 +1234,7 @@ static int qcom_pcie_probe(struct platform_device *pdev)
1234 1234
1235 pcie->pci = pci; 1235 pcie->pci = pci;
1236 1236
1237 pcie->ops = (struct qcom_pcie_ops *)of_device_get_match_data(dev); 1237 pcie->ops = of_device_get_match_data(dev);
1238 1238
1239 pcie->reset = devm_gpiod_get_optional(dev, "perst", GPIOD_OUT_LOW); 1239 pcie->reset = devm_gpiod_get_optional(dev, "perst", GPIOD_OUT_LOW);
1240 if (IS_ERR(pcie->reset)) 1240 if (IS_ERR(pcie->reset))