Lines Matching full:pa
180 struct hpi_adapter *pa = NULL; in asihpi_hpi_ioctl() local
183 pa = &adapters[array_index_nospec(hm->h.adapter_index, in asihpi_hpi_ioctl()
186 if (!pa || !pa->adapter || !pa->adapter->type) { in asihpi_hpi_ioctl()
199 if (mutex_lock_interruptible(&pa->mutex)) { in asihpi_hpi_ioctl()
216 if (pa->buffer_size < size) { in asihpi_hpi_ioctl()
221 pa->buffer_size, size); in asihpi_hpi_ioctl()
222 if (pa->p_buffer) { in asihpi_hpi_ioctl()
223 pa->buffer_size = 0; in asihpi_hpi_ioctl()
224 vfree(pa->p_buffer); in asihpi_hpi_ioctl()
226 pa->p_buffer = vmalloc(size); in asihpi_hpi_ioctl()
227 if (pa->p_buffer) in asihpi_hpi_ioctl()
228 pa->buffer_size = size; in asihpi_hpi_ioctl()
235 mutex_unlock(&pa->mutex); in asihpi_hpi_ioctl()
241 hm->m0.u.d.u.data.pb_data = pa->p_buffer; in asihpi_hpi_ioctl()
257 copy_from_user(pa->p_buffer, ptr, size); in asihpi_hpi_ioctl()
269 copy_to_user(ptr, pa->p_buffer, size); in asihpi_hpi_ioctl()
276 mutex_unlock(&pa->mutex); in asihpi_hpi_ioctl()
533 struct hpi_adapter *pa; in asihpi_adapter_remove() local
536 pa = pci_get_drvdata(pci_dev); in asihpi_adapter_remove()
537 pci = pa->adapter->pci; in asihpi_adapter_remove()
542 hm.adapter_index = pa->adapter->index; in asihpi_adapter_remove()
550 hm.adapter_index = pa->adapter->index; in asihpi_adapter_remove()
557 if (pa->irq) in asihpi_adapter_remove()
558 free_irq(pa->irq, pa); in asihpi_adapter_remove()
560 vfree(pa->p_buffer); in asihpi_adapter_remove()
567 pci_dev->devfn, pa->adapter->index); in asihpi_adapter_remove()
569 memset(pa, 0, sizeof(*pa)); in asihpi_adapter_remove()