Lines Matching refs:wrap
75 struct cdns3_wrap *wrap; in cdns3_pci_probe() local
101 wrap = pci_get_drvdata(func); in cdns3_pci_probe()
103 wrap = kzalloc(sizeof(*wrap), GFP_KERNEL); in cdns3_pci_probe()
104 if (!wrap) { in cdns3_pci_probe()
110 res = wrap->dev_res; in cdns3_pci_probe()
130 wrap->dev_res[RES_IRQ_HOST_ID].start = pdev->irq; in cdns3_pci_probe()
131 wrap->dev_res[RES_IRQ_HOST_ID].name = "host"; in cdns3_pci_probe()
132 wrap->dev_res[RES_IRQ_HOST_ID].flags = IORESOURCE_IRQ; in cdns3_pci_probe()
135 wrap->dev_res[RES_IRQ_PERIPHERAL_ID].start = pdev->irq; in cdns3_pci_probe()
136 wrap->dev_res[RES_IRQ_PERIPHERAL_ID].name = "peripheral"; in cdns3_pci_probe()
137 wrap->dev_res[RES_IRQ_PERIPHERAL_ID].flags = IORESOURCE_IRQ; in cdns3_pci_probe()
147 wrap->dev_res[RES_IRQ_OTG_ID].start = pdev->irq; in cdns3_pci_probe()
148 wrap->dev_res[RES_IRQ_OTG_ID].name = "otg"; in cdns3_pci_probe()
149 wrap->dev_res[RES_IRQ_OTG_ID].flags = IORESOURCE_IRQ; in cdns3_pci_probe()
159 wrap->devfn = pdev->devfn; in cdns3_pci_probe()
160 plat_info.res = wrap->dev_res; in cdns3_pci_probe()
161 plat_info.num_res = ARRAY_SIZE(wrap->dev_res); in cdns3_pci_probe()
164 wrap->plat_dev = platform_device_register_full(&plat_info); in cdns3_pci_probe()
165 if (IS_ERR(wrap->plat_dev)) { in cdns3_pci_probe()
167 err = PTR_ERR(wrap->plat_dev); in cdns3_pci_probe()
168 kfree(wrap); in cdns3_pci_probe()
173 pci_set_drvdata(pdev, wrap); in cdns3_pci_probe()
179 struct cdns3_wrap *wrap; in cdns3_pci_remove() local
184 wrap = (struct cdns3_wrap *)pci_get_drvdata(pdev); in cdns3_pci_remove()
185 if (wrap->devfn == pdev->devfn) in cdns3_pci_remove()
186 platform_device_unregister(wrap->plat_dev); in cdns3_pci_remove()
189 kfree(wrap); in cdns3_pci_remove()