Lines Matching refs:wrap

70 	struct cdns3_wrap *wrap;  in cdns3_pci_probe()  local
96 wrap = pci_get_drvdata(func); in cdns3_pci_probe()
98 wrap = kzalloc(sizeof(*wrap), GFP_KERNEL); in cdns3_pci_probe()
99 if (!wrap) { in cdns3_pci_probe()
105 res = wrap->dev_res; in cdns3_pci_probe()
125 wrap->dev_res[RES_IRQ_HOST_ID].start = pdev->irq; in cdns3_pci_probe()
126 wrap->dev_res[RES_IRQ_HOST_ID].name = "host"; in cdns3_pci_probe()
127 wrap->dev_res[RES_IRQ_HOST_ID].flags = IORESOURCE_IRQ; in cdns3_pci_probe()
130 wrap->dev_res[RES_IRQ_PERIPHERAL_ID].start = pdev->irq; in cdns3_pci_probe()
131 wrap->dev_res[RES_IRQ_PERIPHERAL_ID].name = "peripheral"; in cdns3_pci_probe()
132 wrap->dev_res[RES_IRQ_PERIPHERAL_ID].flags = IORESOURCE_IRQ; in cdns3_pci_probe()
142 wrap->dev_res[RES_IRQ_OTG_ID].start = pdev->irq; in cdns3_pci_probe()
143 wrap->dev_res[RES_IRQ_OTG_ID].name = "otg"; in cdns3_pci_probe()
144 wrap->dev_res[RES_IRQ_OTG_ID].flags = IORESOURCE_IRQ; in cdns3_pci_probe()
154 wrap->devfn = pdev->devfn; in cdns3_pci_probe()
155 plat_info.res = wrap->dev_res; in cdns3_pci_probe()
156 plat_info.num_res = ARRAY_SIZE(wrap->dev_res); in cdns3_pci_probe()
159 wrap->plat_dev = platform_device_register_full(&plat_info); in cdns3_pci_probe()
160 if (IS_ERR(wrap->plat_dev)) { in cdns3_pci_probe()
162 err = PTR_ERR(wrap->plat_dev); in cdns3_pci_probe()
163 kfree(wrap); in cdns3_pci_probe()
168 pci_set_drvdata(pdev, wrap); in cdns3_pci_probe()
174 struct cdns3_wrap *wrap; in cdns3_pci_remove() local
179 wrap = (struct cdns3_wrap *)pci_get_drvdata(pdev); in cdns3_pci_remove()
180 if (wrap->devfn == pdev->devfn) in cdns3_pci_remove()
181 platform_device_unregister(wrap->plat_dev); in cdns3_pci_remove()
184 kfree(wrap); in cdns3_pci_remove()