Lines Matching full:wrap

72 	struct cdns3_wrap *wrap;  in cdns3_pci_probe()  local
98 wrap = pci_get_drvdata(func); in cdns3_pci_probe()
100 wrap = kzalloc(sizeof(*wrap), GFP_KERNEL); in cdns3_pci_probe()
101 if (!wrap) { in cdns3_pci_probe()
107 res = wrap->dev_res; in cdns3_pci_probe()
127 wrap->dev_res[RES_IRQ_HOST_ID].start = pdev->irq; in cdns3_pci_probe()
128 wrap->dev_res[RES_IRQ_HOST_ID].name = "host"; in cdns3_pci_probe()
129 wrap->dev_res[RES_IRQ_HOST_ID].flags = IORESOURCE_IRQ; in cdns3_pci_probe()
132 wrap->dev_res[RES_IRQ_PERIPHERAL_ID].start = pdev->irq; in cdns3_pci_probe()
133 wrap->dev_res[RES_IRQ_PERIPHERAL_ID].name = "peripheral"; in cdns3_pci_probe()
134 wrap->dev_res[RES_IRQ_PERIPHERAL_ID].flags = IORESOURCE_IRQ; in cdns3_pci_probe()
144 wrap->dev_res[RES_IRQ_OTG_ID].start = pdev->irq; in cdns3_pci_probe()
145 wrap->dev_res[RES_IRQ_OTG_ID].name = "otg"; in cdns3_pci_probe()
146 wrap->dev_res[RES_IRQ_OTG_ID].flags = IORESOURCE_IRQ; in cdns3_pci_probe()
156 wrap->devfn = pdev->devfn; in cdns3_pci_probe()
157 plat_info.res = wrap->dev_res; in cdns3_pci_probe()
158 plat_info.num_res = ARRAY_SIZE(wrap->dev_res); in cdns3_pci_probe()
161 wrap->plat_dev = platform_device_register_full(&plat_info); in cdns3_pci_probe()
162 if (IS_ERR(wrap->plat_dev)) { in cdns3_pci_probe()
164 err = PTR_ERR(wrap->plat_dev); in cdns3_pci_probe()
165 kfree(wrap); in cdns3_pci_probe()
170 pci_set_drvdata(pdev, wrap); in cdns3_pci_probe()
176 struct cdns3_wrap *wrap; in cdns3_pci_remove() local
181 wrap = (struct cdns3_wrap *)pci_get_drvdata(pdev); in cdns3_pci_remove()
182 if (wrap->devfn == pdev->devfn) in cdns3_pci_remove()
183 platform_device_unregister(wrap->plat_dev); in cdns3_pci_remove()
186 kfree(wrap); in cdns3_pci_remove()