Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

i3c: mipi-i3c-hci-pci: Change callback parameter

Prepare to add more callbacks in mipi_i3c_hci_pci_info. Change ->init()
callback parameter from PCI device pointer to mipi_i3c_hci_pci_info device
pointer.

Signed-off-by: Adrian Hunter <adrian.hunter@intel.com>
Reviewed-by: Frank Li <Frank.Li@nxp.com>
Link: https://patch.msgid.link/20251128064038.55158-10-adrian.hunter@intel.com
Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com>

authored by

Adrian Hunter and committed by
Alexandre Belloni
0f9ef14b da8116a9

+8 -5
+8 -5
drivers/i3c/master/mipi-i3c-hci/mipi-i3c-hci-pci.c
··· 15 15 #include <linux/platform_device.h> 16 16 17 17 struct mipi_i3c_hci_pci { 18 + struct pci_dev *pci; 18 19 struct platform_device *pdev; 19 20 }; 20 21 21 22 struct mipi_i3c_hci_pci_info { 22 - int (*init)(struct pci_dev *pci); 23 + int (*init)(struct mipi_i3c_hci_pci *hci); 23 24 }; 24 25 25 26 static DEFINE_IDA(mipi_i3c_hci_pci_ida); ··· 51 50 return devm_ioremap(&pci->dev, base + INTEL_PRIV_OFFSET, INTEL_PRIV_SIZE); 52 51 } 53 52 54 - static int intel_i3c_init(struct pci_dev *pci) 53 + static int intel_i3c_init(struct mipi_i3c_hci_pci *hci) 55 54 { 56 - void __iomem *priv = intel_priv(pci); 55 + void __iomem *priv = intel_priv(hci->pci); 57 56 58 57 if (!priv) 59 58 return -ENOMEM; 60 59 61 - dma_set_mask_and_coherent(&pci->dev, DMA_BIT_MASK(64)); 60 + dma_set_mask_and_coherent(&hci->pci->dev, DMA_BIT_MASK(64)); 62 61 63 62 intel_reset(priv); 64 63 ··· 80 79 hci = devm_kzalloc(&pci->dev, sizeof(*hci), GFP_KERNEL); 81 80 if (!hci) 82 81 return -ENOMEM; 82 + 83 + hci->pci = pci; 83 84 84 85 ret = pcim_enable_device(pci); 85 86 if (ret) ··· 116 113 117 114 info = (const struct mipi_i3c_hci_pci_info *)id->driver_data; 118 115 if (info && info->init) { 119 - ret = info->init(pci); 116 + ret = info->init(hci); 120 117 if (ret) 121 118 goto err; 122 119 }