Lines Matching refs:tm_wheel
118 struct tm_wheel { struct
214 struct tm_wheel *tm_wheel = hid_get_drvdata(hdev); in thrustmaster_model_handler() local
224 if (tm_wheel->response->type == cpu_to_le16(0x49)) in thrustmaster_model_handler()
225 model = le16_to_cpu(tm_wheel->response->data.a.model); in thrustmaster_model_handler()
226 else if (tm_wheel->response->type == cpu_to_le16(0x47)) in thrustmaster_model_handler()
227 model = le16_to_cpu(tm_wheel->response->data.b.model); in thrustmaster_model_handler()
229 …hid_err(hdev, "Unknown packet type 0x%x, unable to proceed further with wheel init\n", tm_wheel->r… in thrustmaster_model_handler()
244 tm_wheel->change_request->wValue = cpu_to_le16(twi->switch_value); in thrustmaster_model_handler()
246 tm_wheel->urb, in thrustmaster_model_handler()
247 tm_wheel->usb_dev, in thrustmaster_model_handler()
248 usb_sndctrlpipe(tm_wheel->usb_dev, 0), in thrustmaster_model_handler()
249 (char *)tm_wheel->change_request, in thrustmaster_model_handler()
255 ret = usb_submit_urb(tm_wheel->urb, GFP_ATOMIC); in thrustmaster_model_handler()
262 struct tm_wheel *tm_wheel = hid_get_drvdata(hdev); in thrustmaster_remove() local
264 usb_kill_urb(tm_wheel->urb); in thrustmaster_remove()
266 kfree(tm_wheel->change_request); in thrustmaster_remove()
267 kfree(tm_wheel->response); in thrustmaster_remove()
268 kfree(tm_wheel->model_request); in thrustmaster_remove()
269 usb_free_urb(tm_wheel->urb); in thrustmaster_remove()
270 kfree(tm_wheel); in thrustmaster_remove()
284 struct tm_wheel *tm_wheel = NULL; in thrustmaster_probe() local
302 tm_wheel = kzalloc(sizeof(struct tm_wheel), GFP_KERNEL); in thrustmaster_probe()
303 if (!tm_wheel) { in thrustmaster_probe()
308 tm_wheel->urb = usb_alloc_urb(0, GFP_ATOMIC); in thrustmaster_probe()
309 if (!tm_wheel->urb) { in thrustmaster_probe()
314 tm_wheel->model_request = kmemdup(&model_request, in thrustmaster_probe()
317 if (!tm_wheel->model_request) { in thrustmaster_probe()
322 tm_wheel->response = kzalloc(sizeof(struct tm_wheel_response), GFP_KERNEL); in thrustmaster_probe()
323 if (!tm_wheel->response) { in thrustmaster_probe()
328 tm_wheel->change_request = kmemdup(&change_request, in thrustmaster_probe()
331 if (!tm_wheel->change_request) { in thrustmaster_probe()
336 tm_wheel->usb_dev = interface_to_usbdev(to_usb_interface(hdev->dev.parent)); in thrustmaster_probe()
337 hid_set_drvdata(hdev, tm_wheel); in thrustmaster_probe()
342 tm_wheel->urb, in thrustmaster_probe()
343 tm_wheel->usb_dev, in thrustmaster_probe()
344 usb_rcvctrlpipe(tm_wheel->usb_dev, 0), in thrustmaster_probe()
345 (char *)tm_wheel->model_request, in thrustmaster_probe()
346 tm_wheel->response, in thrustmaster_probe()
352 ret = usb_submit_urb(tm_wheel->urb, GFP_ATOMIC); in thrustmaster_probe()
360 error6: kfree(tm_wheel->change_request); in thrustmaster_probe()
361 error5: kfree(tm_wheel->response); in thrustmaster_probe()
362 error4: kfree(tm_wheel->model_request); in thrustmaster_probe()
363 error3: usb_free_urb(tm_wheel->urb); in thrustmaster_probe()
364 error2: kfree(tm_wheel); in thrustmaster_probe()