Lines Matching defs:device
9 #include <linux/device.h>
135 * Represents an mousevsc device
138 struct hv_device *device;
156 static struct mousevsc_dev *mousevsc_alloc_device(struct hv_device *device)
165 input_dev->device = device;
166 hv_set_drvdata(device, input_dev);
173 static void mousevsc_free_device(struct mousevsc_dev *device)
175 kfree(device->hid_desc);
176 kfree(device->report_desc);
177 hv_set_drvdata(device->device, NULL);
178 kfree(device);
232 ret = vmbus_sendpacket(input_device->device->channel,
249 static void mousevsc_on_receive(struct hv_device *device,
254 struct mousevsc_dev *input_dev = hv_get_drvdata(device);
290 * Parse out the device info into device attr,
308 pm_wakeup_hard_event(&input_dev->device->device);
321 struct hv_device *device = context;
324 foreach_vmbus_pkt(desc, device->channel) {
330 mousevsc_on_receive(device, desc);
341 static int mousevsc_connect_to_vsp(struct hv_device *device)
345 struct mousevsc_dev *input_dev = hv_get_drvdata(device);
360 ret = vmbus_sendpacket(device->channel, request,
392 * We should have gotten the device attr, hid desc and report
448 static int mousevsc_probe(struct hv_device *device,
455 input_dev = mousevsc_alloc_device(device);
460 ret = vmbus_open(device->channel,
466 device
472 ret = mousevsc_connect_to_vsp(device);
497 hid_set_drvdata(hid_dev, device);
517 device_init_wakeup(&device->device, true);
528 vmbus_close(device->channel);
541 device_init_wakeup(&dev->device, false);