Commit f0eb209f authored by Bjorn Helgaas's avatar Bjorn Helgaas
Browse files

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
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -617,7 +617,7 @@ static void qcom_pcie_ep_init(struct dw_pcie_ep *ep)
		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,
	.raise_irq = qcom_pcie_ep_raise_irq,
	.get_features = qcom_pcie_epc_get_features,
+7 −7
Original line number Diff line number Diff line
@@ -1343,7 +1343,7 @@ static int qcom_pcie_config_sid_sm8250(struct qcom_pcie *pcie)

	/* Look for an available entry to hold the mapping */
	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;
		u8 hash;

@@ -1534,6 +1534,12 @@ static int qcom_pcie_probe(struct platform_device *pdev)
	const struct qcom_pcie_cfg *pcie_cfg;
	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);
	if (!pcie)
		return -ENOMEM;
@@ -1553,12 +1559,6 @@ static int qcom_pcie_probe(struct platform_device *pdev)

	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->pipe_clk_need_muxing = pcie_cfg->pipe_clk_need_muxing;