hc
2024-02-20 102a0743326a03cd1a1202ceda21e175b7d3575c
kernel/drivers/pci/controller/pcie-tango.c
....@@ -207,7 +207,7 @@
207207 return ret;
208208 }
209209
210
-static struct pci_ecam_ops smp8759_ecam_ops = {
210
+static const struct pci_ecam_ops smp8759_ecam_ops = {
211211 .bus_shift = 20,
212212 .pci_ops = {
213213 .map_bus = pci_ecam_map_bus,
....@@ -273,10 +273,8 @@
273273 writel_relaxed(0, pcie->base + SMP8759_ENABLE + offset);
274274
275275 virq = platform_get_irq(pdev, 1);
276
- if (virq <= 0) {
277
- dev_err(dev, "Failed to map IRQ\n");
278
- return -ENXIO;
279
- }
276
+ if (virq < 0)
277
+ return virq;
280278
281279 irq_dom = irq_domain_create_linear(fwnode, MSI_MAX, &dom_ops, pcie);
282280 if (!irq_dom) {
....@@ -295,11 +293,14 @@
295293 spin_lock_init(&pcie->used_msi_lock);
296294 irq_set_chained_handler_and_data(virq, tango_msi_isr, pcie);
297295
298
- return pci_host_common_probe(pdev, &smp8759_ecam_ops);
296
+ return pci_host_common_probe(pdev);
299297 }
300298
301299 static const struct of_device_id tango_pcie_ids[] = {
302
- { .compatible = "sigma,smp8759-pcie" },
300
+ {
301
+ .compatible = "sigma,smp8759-pcie",
302
+ .data = &smp8759_ecam_ops,
303
+ },
303304 { },
304305 };
305306