• Home
  • Raw
  • Download

Lines Matching refs:pt

38 	struct pt_device *pt;  in pt_alloc_struct()  local
40 pt = devm_kzalloc(dev, sizeof(*pt), GFP_KERNEL); in pt_alloc_struct()
42 if (!pt) in pt_alloc_struct()
44 pt->dev = dev; in pt_alloc_struct()
46 INIT_LIST_HEAD(&pt->cmd); in pt_alloc_struct()
48 return pt; in pt_alloc_struct()
51 static int pt_get_msix_irqs(struct pt_device *pt) in pt_get_msix_irqs() argument
53 struct pt_msix *pt_msix = pt->pt_msix; in pt_get_msix_irqs()
54 struct device *dev = pt->dev; in pt_get_msix_irqs()
66 pt->pt_irq = pt_msix->msix_entry.vector; in pt_get_msix_irqs()
71 static int pt_get_msi_irq(struct pt_device *pt) in pt_get_msi_irq() argument
73 struct device *dev = pt->dev; in pt_get_msi_irq()
81 pt->pt_irq = pdev->irq; in pt_get_msi_irq()
86 static int pt_get_irqs(struct pt_device *pt) in pt_get_irqs() argument
88 struct device *dev = pt->dev; in pt_get_irqs()
91 ret = pt_get_msix_irqs(pt); in pt_get_irqs()
97 ret = pt_get_msi_irq(pt); in pt_get_irqs()
107 static void pt_free_irqs(struct pt_device *pt) in pt_free_irqs() argument
109 struct pt_msix *pt_msix = pt->pt_msix; in pt_free_irqs()
110 struct device *dev = pt->dev; in pt_free_irqs()
115 else if (pt->pt_irq) in pt_free_irqs()
118 pt->pt_irq = 0; in pt_free_irqs()
123 struct pt_device *pt; in pt_pci_probe() local
130 pt = pt_alloc_struct(dev); in pt_pci_probe()
131 if (!pt) in pt_pci_probe()
138 pt->pt_msix = pt_msix; in pt_pci_probe()
139 pt->dev_vdata = (struct pt_dev_vdata *)id->driver_data; in pt_pci_probe()
140 if (!pt->dev_vdata) { in pt_pci_probe()
166 pt->io_regs = iomap_table[pt->dev_vdata->bar]; in pt_pci_probe()
167 if (!pt->io_regs) { in pt_pci_probe()
173 ret = pt_get_irqs(pt); in pt_pci_probe()
189 dev_set_drvdata(dev, pt); in pt_pci_probe()
191 if (pt->dev_vdata) in pt_pci_probe()
192 ret = pt_core_init(pt); in pt_pci_probe()
208 struct pt_device *pt = dev_get_drvdata(dev); in pt_pci_remove() local
210 if (!pt) in pt_pci_remove()
213 if (pt->dev_vdata) in pt_pci_remove()
214 pt_core_destroy(pt); in pt_pci_remove()
216 pt_free_irqs(pt); in pt_pci_remove()