Lines Matching refs:hdrv
1523 struct hid_driver *hdrv = hid->driver; in hid_process_event() local
1529 if (hdrv && hdrv->event && hid_match_usage(hid, usage)) { in hid_process_event()
1530 ret = hdrv->event(hid, field, usage, value); in hid_process_event()
1534 hdrv->name, ret); in hid_process_event()
2000 struct hid_driver *hdrv; in hid_report_raw_event() local
2041 hdrv = hid->driver; in hid_report_raw_event()
2042 if (hdrv && hdrv->report) in hid_report_raw_event()
2043 hdrv->report(hid, report); in hid_report_raw_event()
2059 struct hid_driver *hdrv; in __hid_input_report() local
2079 hdrv = hid->driver; in __hid_input_report()
2104 if (hdrv && hdrv->raw_event && hid_match_report(hid, report)) { in __hid_input_report()
2105 ret = hdrv->raw_event(hid, report, data, size); in __hid_input_report()
2565 struct hid_driver *hdrv = to_hid_driver(drv); in new_id_store() local
2586 spin_lock(&hdrv->dyn_lock); in new_id_store()
2587 list_add_tail(&dynid->list, &hdrv->dyn_list); in new_id_store()
2588 spin_unlock(&hdrv->dyn_lock); in new_id_store()
2590 ret = driver_attach(&hdrv->driver); in new_id_store()
2602 static void hid_free_dynids(struct hid_driver *hdrv) in hid_free_dynids() argument
2606 spin_lock(&hdrv->dyn_lock); in hid_free_dynids()
2607 list_for_each_entry_safe(dynid, n, &hdrv->dyn_list, list) { in hid_free_dynids()
2611 spin_unlock(&hdrv->dyn_lock); in hid_free_dynids()
2615 struct hid_driver *hdrv) in hid_match_device() argument
2619 spin_lock(&hdrv->dyn_lock); in hid_match_device()
2620 list_for_each_entry(dynid, &hdrv->dyn_list, list) { in hid_match_device()
2622 spin_unlock(&hdrv->dyn_lock); in hid_match_device()
2626 spin_unlock(&hdrv->dyn_lock); in hid_match_device()
2628 return hid_match_id(hdev, hdrv->id_table); in hid_match_device()
2634 struct hid_driver *hdrv = to_hid_driver(drv); in hid_bus_match() local
2637 return hid_match_device(hdev, hdrv) != NULL; in hid_bus_match()
2664 struct hid_driver *hdrv, in hid_check_device_match() argument
2667 *id = hid_match_device(hdev, hdrv); in hid_check_device_match()
2671 if (hdrv->match) in hid_check_device_match()
2672 return hdrv->match(hdev, hid_ignore_special_drivers); in hid_check_device_match()
2682 static int __hid_device_probe(struct hid_device *hdev, struct hid_driver *hdrv) in __hid_device_probe() argument
2687 if (!hid_check_device_match(hdev, hdrv, &id)) in __hid_device_probe()
2696 hdev->driver = hdrv; in __hid_device_probe()
2698 if (hdrv->probe) { in __hid_device_probe()
2699 ret = hdrv->probe(hdev, id); in __hid_device_probe()
2726 struct hid_driver *hdrv = to_hid_driver(dev->driver); in hid_device_probe() local
2736 ret = __hid_device_probe(hdev, hdrv); in hid_device_probe()
2747 struct hid_driver *hdrv; in hid_device_remove() local
2752 hdrv = hdev->driver; in hid_device_remove()
2753 if (hdrv) { in hid_device_remove()
2754 if (hdrv->remove) in hid_device_remove()
2755 hdrv->remove(hdev); in hid_device_remove()
2967 struct hid_driver *hdrv = data; in __hid_bus_reprobe_drivers() local
2970 if (hdev->driver == hdrv && in __hid_bus_reprobe_drivers()
2971 !hdrv->match(hdev, hid_ignore_special_drivers) && in __hid_bus_reprobe_drivers()
2980 struct hid_driver *hdrv = to_hid_driver(drv); in __hid_bus_driver_added() local
2982 if (hdrv->match) { in __hid_bus_driver_added()
2983 bus_for_each_dev(&hid_bus_type, NULL, hdrv, in __hid_bus_driver_added()
2995 int __hid_register_driver(struct hid_driver *hdrv, struct module *owner, in __hid_register_driver() argument
3000 hdrv->driver.name = hdrv->name; in __hid_register_driver()
3001 hdrv->driver.bus = &hid_bus_type; in __hid_register_driver()
3002 hdrv->driver.owner = owner; in __hid_register_driver()
3003 hdrv->driver.mod_name = mod_name; in __hid_register_driver()
3005 INIT_LIST_HEAD(&hdrv->dyn_list); in __hid_register_driver()
3006 spin_lock_init(&hdrv->dyn_lock); in __hid_register_driver()
3008 ret = driver_register(&hdrv->driver); in __hid_register_driver()
3018 void hid_unregister_driver(struct hid_driver *hdrv) in hid_unregister_driver() argument
3020 driver_unregister(&hdrv->driver); in hid_unregister_driver()
3021 hid_free_dynids(hdrv); in hid_unregister_driver()
3023 bus_for_each_drv(&hid_bus_type, NULL, hdrv, __bus_removed_driver); in hid_unregister_driver()