Lines Matching refs:tm_wheel
118 struct tm_wheel { struct
223 struct tm_wheel *tm_wheel = hid_get_drvdata(hdev); in thrustmaster_model_handler() local
233 if (tm_wheel->response->type == cpu_to_le16(0x49)) in thrustmaster_model_handler()
234 model = le16_to_cpu(tm_wheel->response->data.a.model); in thrustmaster_model_handler()
235 else if (tm_wheel->response->type == cpu_to_le16(0x47)) in thrustmaster_model_handler()
236 model = le16_to_cpu(tm_wheel->response->data.b.model); in thrustmaster_model_handler()
238 …hid_err(hdev, "Unknown packet type 0x%x, unable to proceed further with wheel init\n", tm_wheel->r… in thrustmaster_model_handler()
253 tm_wheel->change_request->wValue = cpu_to_le16(twi->switch_value); in thrustmaster_model_handler()
255 tm_wheel->urb, in thrustmaster_model_handler()
256 tm_wheel->usb_dev, in thrustmaster_model_handler()
257 usb_sndctrlpipe(tm_wheel->usb_dev, 0), in thrustmaster_model_handler()
258 (char *)tm_wheel->change_request, in thrustmaster_model_handler()
264 ret = usb_submit_urb(tm_wheel->urb, GFP_ATOMIC); in thrustmaster_model_handler()
271 struct tm_wheel *tm_wheel = hid_get_drvdata(hdev); in thrustmaster_remove() local
273 usb_kill_urb(tm_wheel->urb); in thrustmaster_remove()
275 kfree(tm_wheel->change_request); in thrustmaster_remove()
276 kfree(tm_wheel->response); in thrustmaster_remove()
277 kfree(tm_wheel->model_request); in thrustmaster_remove()
278 usb_free_urb(tm_wheel->urb); in thrustmaster_remove()
279 kfree(tm_wheel); in thrustmaster_remove()
293 struct tm_wheel *tm_wheel = NULL; in thrustmaster_probe() local
311 tm_wheel = kzalloc_obj(struct tm_wheel); in thrustmaster_probe()
312 if (!tm_wheel) { in thrustmaster_probe()
317 tm_wheel->urb = usb_alloc_urb(0, GFP_ATOMIC); in thrustmaster_probe()
318 if (!tm_wheel->urb) { in thrustmaster_probe()
323 tm_wheel->model_request = kmemdup(&model_request, in thrustmaster_probe()
326 if (!tm_wheel->model_request) { in thrustmaster_probe()
331 tm_wheel->response = kzalloc_obj(struct tm_wheel_response); in thrustmaster_probe()
332 if (!tm_wheel->response) { in thrustmaster_probe()
337 tm_wheel->change_request = kmemdup(&change_request, in thrustmaster_probe()
340 if (!tm_wheel->change_request) { in thrustmaster_probe()
345 tm_wheel->usb_dev = interface_to_usbdev(to_usb_interface(hdev->dev.parent)); in thrustmaster_probe()
346 hid_set_drvdata(hdev, tm_wheel); in thrustmaster_probe()
351 tm_wheel->urb, in thrustmaster_probe()
352 tm_wheel->usb_dev, in thrustmaster_probe()
353 usb_rcvctrlpipe(tm_wheel->usb_dev, 0), in thrustmaster_probe()
354 (char *)tm_wheel->model_request, in thrustmaster_probe()
355 tm_wheel->response, in thrustmaster_probe()
361 ret = usb_submit_urb(tm_wheel->urb, GFP_ATOMIC); in thrustmaster_probe()
369 error6: kfree(tm_wheel->change_request); in thrustmaster_probe()
370 error5: kfree(tm_wheel->response); in thrustmaster_probe()
371 error4: kfree(tm_wheel->model_request); in thrustmaster_probe()
372 error3: usb_free_urb(tm_wheel->urb); in thrustmaster_probe()
373 error2: kfree(tm_wheel); in thrustmaster_probe()