Skip to content

Commit f0eb209

Browse files
committed
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()'
2 parents 0de15db + 840a720 commit f0eb209

File tree

2 files changed

+8
-8
lines changed

2 files changed

+8
-8
lines changed

drivers/pci/controller/dwc/pcie-qcom-ep.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -617,7 +617,7 @@ static void qcom_pcie_ep_init(struct dw_pcie_ep *ep)
617617
dw_pcie_ep_reset_bar(pci, bar);
618618
}
619619

620-
static struct dw_pcie_ep_ops pci_ep_ops = {
620+
static const struct dw_pcie_ep_ops pci_ep_ops = {
621621
.ep_init = qcom_pcie_ep_init,
622622
.raise_irq = qcom_pcie_ep_raise_irq,
623623
.get_features = qcom_pcie_epc_get_features,

drivers/pci/controller/dwc/pcie-qcom.c

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1343,7 +1343,7 @@ static int qcom_pcie_config_sid_sm8250(struct qcom_pcie *pcie)
13431343

13441344
/* Look for an available entry to hold the mapping */
13451345
for (i = 0; i < nr_map; i++) {
1346-
u16 bdf_be = cpu_to_be16(map[i].bdf);
1346+
__be16 bdf_be = cpu_to_be16(map[i].bdf);
13471347
u32 val;
13481348
u8 hash;
13491349

@@ -1534,6 +1534,12 @@ static int qcom_pcie_probe(struct platform_device *pdev)
15341534
const struct qcom_pcie_cfg *pcie_cfg;
15351535
int ret;
15361536

1537+
pcie_cfg = of_device_get_match_data(dev);
1538+
if (!pcie_cfg || !pcie_cfg->ops) {
1539+
dev_err(dev, "Invalid platform data\n");
1540+
return -EINVAL;
1541+
}
1542+
15371543
pcie = devm_kzalloc(dev, sizeof(*pcie), GFP_KERNEL);
15381544
if (!pcie)
15391545
return -ENOMEM;
@@ -1553,12 +1559,6 @@ static int qcom_pcie_probe(struct platform_device *pdev)
15531559

15541560
pcie->pci = pci;
15551561

1556-
pcie_cfg = of_device_get_match_data(dev);
1557-
if (!pcie_cfg || !pcie_cfg->ops) {
1558-
dev_err(dev, "Invalid platform data\n");
1559-
return -EINVAL;
1560-
}
1561-
15621562
pcie->ops = pcie_cfg->ops;
15631563
pcie->pipe_clk_need_muxing = pcie_cfg->pipe_clk_need_muxing;
15641564

0 commit comments

Comments
 (0)