Lines Matching refs:pIntf
176 struct usb_interface *pIntf = get_usb_interface(dev); in ms_usb_release_intf() local
179 if (pIntf->altsetting) in ms_usb_release_intf()
181 for (ii = 0; ii < pIntf->num_altsetting; ii++) in ms_usb_release_intf()
183 struct usb_host_interface *pAltset = &pIntf->altsetting[ii]; in ms_usb_release_intf()
188 kfree(pIntf->altsetting); in ms_usb_release_intf()
191 kfree(pIntf); in ms_usb_release_intf()
206 struct usb_interface *pIntf, in ms_usb_parse_interface() argument
215 pIntf->act_altsetting = 0; in ms_usb_parse_interface()
216 pIntf->num_altsetting = 0; in ms_usb_parse_interface()
217 pIntf->max_altsetting = USB_ALTSETTING_ALLOC; //Use 4 interface altsettings each time in ms_usb_parse_interface()
218 ms_device_initialize(&pIntf->dev); in ms_usb_parse_interface()
219 pIntf->dev.release_func = ms_usb_release_intf; in ms_usb_parse_interface()
221 pIntf->altsetting = (struct usb_host_interface *) in ms_usb_parse_interface()
222 kmalloc(sizeof(*pIntf->altsetting) * pIntf->max_altsetting, GFP_KERNEL); in ms_usb_parse_interface()
224 if (!pIntf->altsetting) in ms_usb_parse_interface()
232 if (pIntf->num_altsetting >= pIntf->max_altsetting) //Allocate more memory for altset in ms_usb_parse_interface()
237 cur_max_altsetting = pIntf->max_altsetting; in ms_usb_parse_interface()
238 pIntf->max_altsetting += USB_ALTSETTING_ALLOC; in ms_usb_parse_interface()
239 if (pIntf->max_altsetting > USB_MAX_ALTSETTING) in ms_usb_parse_interface()
246 kmalloc(sizeof(*pInft_tmp) * pIntf->max_altsetting, GFP_KERNEL); in ms_usb_parse_interface()
252 memcpy(pInft_tmp, pIntf->altsetting, sizeof(*pIntf->altsetting) * cur_max_altsetting); in ms_usb_parse_interface()
253 kfree(pIntf->altsetting); in ms_usb_parse_interface()
254 pIntf->altsetting = pInft_tmp; in ms_usb_parse_interface()
257 pIf = pIntf->altsetting + pIntf->num_altsetting; in ms_usb_parse_interface()
259 pIntf->num_altsetting++; in ms_usb_parse_interface()