Commit f0eb209f authored by Bjorn Helgaas's avatar Bjorn Helgaas

Merge branch 'remotes/lorenzo/pci/qcom'

- Undo PM setup in qcom_pcie_probe() error handling path (Christophe
  JAILLET)

- Use __be16 type to store return value from cpu_to_be16() (Manivannan
  Sadhasivam)

- Constify static dw_pcie_ep_ops (Rikard Falkeborn)

* remotes/lorenzo/pci/qcom:
  PCI: qcom-ep: Constify static dw_pcie_ep_ops
  PCI: qcom: Use __be16 type to store return value from cpu_to_be16()
  PCI: qcom: Fix an error handling path in 'qcom_pcie_probe()'
parents 0de15dbb 840a720a
...@@ -617,7 +617,7 @@ static void qcom_pcie_ep_init(struct dw_pcie_ep *ep) ...@@ -617,7 +617,7 @@ static void qcom_pcie_ep_init(struct dw_pcie_ep *ep)
dw_pcie_ep_reset_bar(pci, bar); dw_pcie_ep_reset_bar(pci, bar);
} }
static struct dw_pcie_ep_ops pci_ep_ops = { static const struct dw_pcie_ep_ops pci_ep_ops = {
.ep_init = qcom_pcie_ep_init, .ep_init = qcom_pcie_ep_init,
.raise_irq = qcom_pcie_ep_raise_irq, .raise_irq = qcom_pcie_ep_raise_irq,
.get_features = qcom_pcie_epc_get_features, .get_features = qcom_pcie_epc_get_features,
......
...@@ -1343,7 +1343,7 @@ static int qcom_pcie_config_sid_sm8250(struct qcom_pcie *pcie) ...@@ -1343,7 +1343,7 @@ static int qcom_pcie_config_sid_sm8250(struct qcom_pcie *pcie)
/* Look for an available entry to hold the mapping */ /* Look for an available entry to hold the mapping */
for (i = 0; i < nr_map; i++) { for (i = 0; i < nr_map; i++) {
u16 bdf_be = cpu_to_be16(map[i].bdf); __be16 bdf_be = cpu_to_be16(map[i].bdf);
u32 val; u32 val;
u8 hash; u8 hash;
...@@ -1534,6 +1534,12 @@ static int qcom_pcie_probe(struct platform_device *pdev) ...@@ -1534,6 +1534,12 @@ static int qcom_pcie_probe(struct platform_device *pdev)
const struct qcom_pcie_cfg *pcie_cfg; const struct qcom_pcie_cfg *pcie_cfg;
int ret; int ret;
pcie_cfg = of_device_get_match_data(dev);
if (!pcie_cfg || !pcie_cfg->ops) {
dev_err(dev, "Invalid platform data\n");
return -EINVAL;
}
pcie = devm_kzalloc(dev, sizeof(*pcie), GFP_KERNEL); pcie = devm_kzalloc(dev, sizeof(*pcie), GFP_KERNEL);
if (!pcie) if (!pcie)
return -ENOMEM; return -ENOMEM;
...@@ -1553,12 +1559,6 @@ static int qcom_pcie_probe(struct platform_device *pdev) ...@@ -1553,12 +1559,6 @@ static int qcom_pcie_probe(struct platform_device *pdev)
pcie->pci = pci; pcie->pci = pci;
pcie_cfg = of_device_get_match_data(dev);
if (!pcie_cfg || !pcie_cfg->ops) {
dev_err(dev, "Invalid platform data\n");
return -EINVAL;
}
pcie->ops = pcie_cfg->ops; pcie->ops = pcie_cfg->ops;
pcie->pipe_clk_need_muxing = pcie_cfg->pipe_clk_need_muxing; pcie->pipe_clk_need_muxing = pcie_cfg->pipe_clk_need_muxing;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment