/linux-4.1.27/drivers/base/ |
H A D | module.c | 14 static char *make_driver_name(struct device_driver *drv) make_driver_name() argument 18 driver_name = kasprintf(GFP_KERNEL, "%s:%s", drv->bus->name, drv->name); make_driver_name() 33 void module_add_driver(struct module *mod, struct device_driver *drv) module_add_driver() argument 39 if (!drv) module_add_driver() 44 else if (drv->mod_name) { module_add_driver() 48 mkobj = kset_find_obj(module_kset, drv->mod_name); module_add_driver() 52 drv->p->mkobj = mk; module_add_driver() 62 no_warn = sysfs_create_link(&drv->p->kobj, &mk->kobj, "module"); module_add_driver() 63 driver_name = make_driver_name(drv); module_add_driver() 66 no_warn = sysfs_create_link(mk->drivers_dir, &drv->p->kobj, module_add_driver() 72 void module_remove_driver(struct device_driver *drv) module_remove_driver() argument 77 if (!drv) module_remove_driver() 80 sysfs_remove_link(&drv->p->kobj, "module"); module_remove_driver() 82 if (drv->owner) module_remove_driver() 83 mk = &drv->owner->mkobj; module_remove_driver() 84 else if (drv->p->mkobj) module_remove_driver() 85 mk = drv->p->mkobj; module_remove_driver() 87 driver_name = make_driver_name(drv); module_remove_driver()
|
H A D | driver.c | 36 * @drv: Driver we're iterating. 41 * Iterate over the @drv's list of devices calling @fn for each one. 43 int driver_for_each_device(struct device_driver *drv, struct device *start, driver_for_each_device() argument 50 if (!drv) driver_for_each_device() 53 klist_iter_init_node(&drv->p->klist_devices, &i, driver_for_each_device() 64 * @drv: The device's driver 77 struct device *driver_find_device(struct device_driver *drv, driver_find_device() argument 84 if (!drv || !drv->p) driver_find_device() 87 klist_iter_init_node(&drv->p->klist_devices, &i, driver_find_device() 99 * @drv: driver. 102 int driver_create_file(struct device_driver *drv, driver_create_file() argument 107 if (drv) driver_create_file() 108 error = sysfs_create_file(&drv->p->kobj, &attr->attr); driver_create_file() 117 * @drv: driver. 120 void driver_remove_file(struct device_driver *drv, driver_remove_file() argument 123 if (drv) driver_remove_file() 124 sysfs_remove_file(&drv->p->kobj, &attr->attr); driver_remove_file() 128 int driver_add_groups(struct device_driver *drv, driver_add_groups() argument 131 return sysfs_create_groups(&drv->p->kobj, groups); driver_add_groups() 134 void driver_remove_groups(struct device_driver *drv, driver_remove_groups() argument 137 sysfs_remove_groups(&drv->p->kobj, groups); driver_remove_groups() 142 * @drv: driver to register 148 int driver_register(struct device_driver *drv) driver_register() argument 153 BUG_ON(!drv->bus->p); driver_register() 155 if ((drv->bus->probe && drv->probe) || driver_register() 156 (drv->bus->remove && drv->remove) || driver_register() 157 (drv->bus->shutdown && drv->shutdown)) driver_register() 159 "bus_type methods\n", drv->name); driver_register() 161 other = driver_find(drv->name, drv->bus); driver_register() 164 "aborting...\n", drv->name); driver_register() 168 ret = bus_add_driver(drv); driver_register() 171 ret = driver_add_groups(drv, drv->groups); driver_register() 173 bus_remove_driver(drv); driver_register() 176 kobject_uevent(&drv->p->kobj, KOBJ_ADD); driver_register() 184 * @drv: driver. 188 void driver_unregister(struct device_driver *drv) driver_unregister() argument 190 if (!drv || !drv->p) { driver_unregister() 194 driver_remove_groups(drv, drv->groups); driver_unregister() 195 bus_remove_driver(drv); driver_unregister()
|
H A D | base.h | 108 extern int bus_add_driver(struct device_driver *drv); hypervisor_init() 109 extern void bus_remove_driver(struct device_driver *drv); hypervisor_init() 111 extern void driver_detach(struct device_driver *drv); hypervisor_init() 112 extern int driver_probe_device(struct device_driver *drv, struct device *dev); hypervisor_init() 114 static inline int driver_match_device(struct device_driver *drv, driver_match_device() argument 117 return drv->bus->match ? drv->bus->match(dev, drv) : 1; driver_match_device() 120 extern int driver_add_groups(struct device_driver *drv, 122 extern void driver_remove_groups(struct device_driver *drv, 138 extern void module_add_driver(struct module *mod, struct device_driver *drv); 139 extern void module_remove_driver(struct device_driver *drv); 142 struct device_driver *drv) { } module_remove_driver() 143 static inline void module_remove_driver(struct device_driver *drv) { } module_remove_driver() argument 141 module_add_driver(struct module *mod, struct device_driver *drv) module_add_driver() argument
|
H A D | platform.c | 507 struct platform_driver *drv = to_platform_driver(_dev->driver); platform_drv_probe() local 517 ret = drv->probe(dev); platform_drv_probe() 522 if (drv->prevent_deferred_probe && ret == -EPROBE_DEFER) { platform_drv_probe() 537 struct platform_driver *drv = to_platform_driver(_dev->driver); platform_drv_remove() local 541 ret = drv->remove(dev); platform_drv_remove() 549 struct platform_driver *drv = to_platform_driver(_dev->driver); platform_drv_shutdown() local 552 drv->shutdown(dev); platform_drv_shutdown() 558 * @drv: platform driver structure 561 int __platform_driver_register(struct platform_driver *drv, __platform_driver_register() argument 564 drv->driver.owner = owner; __platform_driver_register() 565 drv->driver.bus = &platform_bus_type; __platform_driver_register() 566 if (drv->probe) __platform_driver_register() 567 drv->driver.probe = platform_drv_probe; __platform_driver_register() 568 if (drv->remove) __platform_driver_register() 569 drv->driver.remove = platform_drv_remove; __platform_driver_register() 570 if (drv->shutdown) __platform_driver_register() 571 drv->driver.shutdown = platform_drv_shutdown; __platform_driver_register() 573 return driver_register(&drv->driver); __platform_driver_register() 579 * @drv: platform driver structure 581 void platform_driver_unregister(struct platform_driver *drv) platform_driver_unregister() argument 583 driver_unregister(&drv->driver); platform_driver_unregister() 589 * @drv: platform driver structure 607 int __init_or_module __platform_driver_probe(struct platform_driver *drv, __platform_driver_probe() argument 616 drv->prevent_deferred_probe = true; __platform_driver_probe() 619 drv->driver.suppress_bind_attrs = true; __platform_driver_probe() 622 drv->probe = probe; __platform_driver_probe() 623 retval = code = __platform_driver_register(drv, module); __platform_driver_probe() 631 spin_lock(&drv->driver.bus->p->klist_drivers.k_lock); __platform_driver_probe() 632 drv->probe = NULL; __platform_driver_probe() 633 if (code == 0 && list_empty(&drv->driver.p->klist_devices.k_list)) __platform_driver_probe() 635 drv->driver.probe = platform_drv_probe_fail; __platform_driver_probe() 636 spin_unlock(&drv->driver.bus->p->klist_drivers.k_lock); __platform_driver_probe() 639 platform_driver_unregister(drv); __platform_driver_probe() 810 * @drv: driver. 820 static int platform_match(struct device *dev, struct device_driver *drv) platform_match() argument 823 struct platform_driver *pdrv = to_platform_driver(drv); platform_match() 827 return !strcmp(pdev->driver_override, drv->name); platform_match() 830 if (of_driver_match_device(dev, drv)) platform_match() 834 if (acpi_driver_match_device(dev, drv)) platform_match() 842 return (strcmp(pdev->name, drv->name) == 0); platform_match() 877 struct device_driver *drv = dev->driver; platform_pm_suspend() local 880 if (!drv) platform_pm_suspend() 883 if (drv->pm) { platform_pm_suspend() 884 if (drv->pm->suspend) platform_pm_suspend() 885 ret = drv->pm->suspend(dev); platform_pm_suspend() 895 struct device_driver *drv = dev->driver; platform_pm_resume() local 898 if (!drv) platform_pm_resume() 901 if (drv->pm) { platform_pm_resume() 902 if (drv->pm->resume) platform_pm_resume() 903 ret = drv->pm->resume(dev); platform_pm_resume() 917 struct device_driver *drv = dev->driver; platform_pm_freeze() local 920 if (!drv) platform_pm_freeze() 923 if (drv->pm) { platform_pm_freeze() 924 if (drv->pm->freeze) platform_pm_freeze() 925 ret = drv->pm->freeze(dev); platform_pm_freeze() 935 struct device_driver *drv = dev->driver; platform_pm_thaw() local 938 if (!drv) platform_pm_thaw() 941 if (drv->pm) { platform_pm_thaw() 942 if (drv->pm->thaw) platform_pm_thaw() 943 ret = drv->pm->thaw(dev); platform_pm_thaw() 953 struct device_driver *drv = dev->driver; platform_pm_poweroff() local 956 if (!drv) platform_pm_poweroff() 959 if (drv->pm) { platform_pm_poweroff() 960 if (drv->pm->poweroff) platform_pm_poweroff() 961 ret = drv->pm->poweroff(dev); platform_pm_poweroff() 971 struct device_driver *drv = dev->driver; platform_pm_restore() local 974 if (!drv) platform_pm_restore() 977 if (drv->pm) { platform_pm_restore() 978 if (drv->pm->restore) platform_pm_restore() 979 ret = drv->pm->restore(dev); platform_pm_restore()
|
H A D | dd.c | 242 struct device_driver *drv = dev->driver; driver_sysfs_remove() local 244 if (drv) { driver_sysfs_remove() 245 sysfs_remove_link(&drv->p->kobj, kobject_name(&dev->kobj)); driver_sysfs_remove() 278 static int really_probe(struct device *dev, struct device_driver *drv) really_probe() argument 285 drv->bus->name, __func__, drv->name, dev_name(dev)); really_probe() 288 dev->driver = drv; really_probe() 311 } else if (drv->probe) { really_probe() 312 ret = drv->probe(dev); really_probe() 323 drv->bus->name, __func__, dev_name(dev), drv->name); really_probe() 337 dev_dbg(dev, "Driver %s requests probe deferral\n", drv->name); really_probe() 346 drv->name, dev_name(dev), ret); really_probe() 352 drv->name, dev_name(dev), ret); really_probe() 394 * @drv: driver to bind a device to 403 int driver_probe_device(struct device_driver *drv, struct device *dev) driver_probe_device() argument 411 drv->bus->name, __func__, dev_name(dev), drv->name); driver_probe_device() 414 ret = really_probe(dev, drv); driver_probe_device() 420 static int __device_attach(struct device_driver *drv, void *data) __device_attach() argument 424 if (!driver_match_device(drv, dev)) __device_attach() 427 return driver_probe_device(drv, dev); __device_attach() 473 struct device_driver *drv = data; __driver_attach() local 485 if (!driver_match_device(drv, dev)) __driver_attach() 492 driver_probe_device(drv, dev); __driver_attach() 502 * @drv: driver. 509 int driver_attach(struct device_driver *drv) driver_attach() argument 511 return bus_for_each_dev(drv->bus, NULL, drv, __driver_attach); driver_attach() 521 struct device_driver *drv; __device_release_driver() local 523 drv = dev->driver; __device_release_driver() 524 if (drv) { __device_release_driver() 538 else if (drv->remove) __device_release_driver() 539 drv->remove(dev); __device_release_driver() 577 * @drv: driver. 579 void driver_detach(struct device_driver *drv) driver_detach() argument 585 spin_lock(&drv->p->klist_devices.k_lock); driver_detach() 586 if (list_empty(&drv->p->klist_devices.k_list)) { driver_detach() 587 spin_unlock(&drv->p->klist_devices.k_lock); driver_detach() 590 dev_prv = list_entry(drv->p->klist_devices.k_list.prev, driver_detach() 595 spin_unlock(&drv->p->klist_devices.k_lock); driver_detach() 600 if (dev->driver == drv) driver_detach()
|
H A D | bus.c | 180 static ssize_t unbind_store(struct device_driver *drv, const char *buf, unbind_store() argument 183 struct bus_type *bus = bus_get(drv->bus); unbind_store() 188 if (dev && dev->driver == drv) { unbind_store() 207 static ssize_t bind_store(struct device_driver *drv, const char *buf, bind_store() argument 210 struct bus_type *bus = bus_get(drv->bus); bind_store() 215 if (dev && dev->driver == NULL && driver_match_device(drv, dev)) { bind_store() 219 err = driver_probe_device(drv, dev); bind_store() 454 struct device_driver *drv; bus_for_each_drv() local 462 while ((drv = next_driver(&i)) && !error) bus_for_each_drv() 463 error = fn(drv, data); bus_for_each_drv() 607 static int __must_check add_bind_files(struct device_driver *drv) add_bind_files() argument 611 ret = driver_create_file(drv, &driver_attr_unbind); add_bind_files() 613 ret = driver_create_file(drv, &driver_attr_bind); add_bind_files() 615 driver_remove_file(drv, &driver_attr_unbind); add_bind_files() 620 static void remove_bind_files(struct device_driver *drv) remove_bind_files() argument 622 driver_remove_file(drv, &driver_attr_bind); remove_bind_files() 623 driver_remove_file(drv, &driver_attr_unbind); remove_bind_files() 651 static ssize_t uevent_store(struct device_driver *drv, const char *buf, uevent_store() argument 657 kobject_uevent(&drv->p->kobj, action); uevent_store() 664 * @drv: driver. 666 int bus_add_driver(struct device_driver *drv) bus_add_driver() argument 672 bus = bus_get(drv->bus); bus_add_driver() 676 pr_debug("bus: '%s': add driver %s\n", bus->name, drv->name); bus_add_driver() 684 priv->driver = drv; bus_add_driver() 685 drv->p = priv; bus_add_driver() 688 "%s", drv->name); bus_add_driver() 693 if (drv->bus->p->drivers_autoprobe) { bus_add_driver() 694 error = driver_attach(drv); bus_add_driver() 698 module_add_driver(drv->owner, drv); bus_add_driver() 700 error = driver_create_file(drv, &driver_attr_uevent); bus_add_driver() 703 __func__, drv->name); bus_add_driver() 705 error = driver_add_groups(drv, bus->drv_groups); bus_add_driver() 709 __func__, drv->name); bus_add_driver() 712 if (!drv->suppress_bind_attrs) { bus_add_driver() 713 error = add_bind_files(drv); bus_add_driver() 717 __func__, drv->name); bus_add_driver() 725 kfree(drv->p); bus_add_driver() 726 drv->p = NULL; bus_add_driver() 734 * @drv: driver. 740 void bus_remove_driver(struct device_driver *drv) bus_remove_driver() argument 742 if (!drv->bus) bus_remove_driver() 745 if (!drv->suppress_bind_attrs) bus_remove_driver() 746 remove_bind_files(drv); bus_remove_driver() 747 driver_remove_groups(drv, drv->bus->drv_groups); bus_remove_driver() 748 driver_remove_file(drv, &driver_attr_uevent); bus_remove_driver() 749 klist_remove(&drv->p->knode_bus); bus_remove_driver() 750 pr_debug("bus: '%s': remove driver %s\n", drv->bus->name, drv->name); bus_remove_driver() 751 driver_detach(drv); bus_remove_driver() 752 module_remove_driver(drv); bus_remove_driver() 753 kobject_put(&drv->p->kobj); bus_remove_driver() 754 bus_put(drv->bus); bus_remove_driver()
|
/linux-4.1.27/drivers/staging/i2o/ |
H A D | driver.c | 39 * @drv: the driver to match against 46 static int i2o_bus_match(struct device *dev, struct device_driver *drv) i2o_bus_match() argument 49 struct i2o_driver *i2o_drv = to_i2o_driver(drv); i2o_bus_match() 70 * @drv: I2O driver which should be registered 72 * Registers the OSM drv in the I2O core and creates an event queues if 77 int i2o_driver_register(struct i2o_driver *drv) i2o_driver_register() argument 84 osm_debug("Register driver %s\n", drv->name); i2o_driver_register() 86 if (drv->event) { i2o_driver_register() 87 drv->event_queue = alloc_workqueue("%s", WQ_MEM_RECLAIM, 1, i2o_driver_register() 88 drv->name); i2o_driver_register() 89 if (!drv->event_queue) { i2o_driver_register() 91 "%s\n", drv->name); i2o_driver_register() 94 osm_debug("Event queue initialized for driver %s\n", drv->name); i2o_driver_register() 96 drv->event_queue = NULL; i2o_driver_register() 98 drv->driver.name = drv->name; i2o_driver_register() 99 drv->driver.bus = &i2o_bus_type; i2o_driver_register() 111 drv->context = i; i2o_driver_register() 112 i2o_drivers[i] = drv; i2o_driver_register() 116 osm_debug("driver %s gets context id %d\n", drv->name, drv->context); i2o_driver_register() 121 i2o_driver_notify_controller_add(drv, c); i2o_driver_register() 123 i2o_driver_notify_device_add(drv, i2o_dev); i2o_driver_register() 126 rc = driver_register(&drv->driver); i2o_driver_register() 132 if (drv->event_queue) { i2o_driver_register() 133 destroy_workqueue(drv->event_queue); i2o_driver_register() 134 drv->event_queue = NULL; i2o_driver_register() 142 * @drv: I2O driver which should be unregistered 144 * Unregisters the OSM drv from the I2O core and cleanup event queues if 147 void i2o_driver_unregister(struct i2o_driver *drv) i2o_driver_unregister() argument 152 osm_debug("unregister driver %s\n", drv->name); i2o_driver_unregister() 154 driver_unregister(&drv->driver); i2o_driver_unregister() 160 i2o_driver_notify_device_remove(drv, i2o_dev); i2o_driver_unregister() 162 i2o_driver_notify_controller_remove(drv, c); i2o_driver_unregister() 166 i2o_drivers[drv->context] = NULL; i2o_driver_unregister() 169 if (drv->event_queue) { i2o_driver_unregister() 170 destroy_workqueue(drv->event_queue); i2o_driver_unregister() 171 drv->event_queue = NULL; i2o_driver_unregister() 172 osm_debug("event queue removed for %s\n", drv->name); i2o_driver_unregister() 190 struct i2o_driver *drv; i2o_driver_dispatch() local 202 drv = i2o_drivers[context]; i2o_driver_dispatch() 205 if (unlikely(!drv)) { i2o_driver_dispatch() 219 if (!drv->event) i2o_driver_dispatch() 240 INIT_WORK(&evt->work, drv->event); i2o_driver_dispatch() 241 queue_work(drv->event_queue, &evt->work); i2o_driver_dispatch() 245 if (unlikely(!drv->reply)) { i2o_driver_dispatch() 247 c->name, drv->name); i2o_driver_dispatch() 251 return drv->reply(c, m, msg); i2o_driver_dispatch() 264 struct i2o_driver *drv; i2o_driver_notify_controller_add_all() local 267 drv = i2o_drivers[i]; i2o_driver_notify_controller_add_all() 269 if (drv) i2o_driver_notify_controller_add_all() 270 i2o_driver_notify_controller_add(drv, c); i2o_driver_notify_controller_add_all() 284 struct i2o_driver *drv; i2o_driver_notify_controller_remove_all() local 287 drv = i2o_drivers[i]; i2o_driver_notify_controller_remove_all() 289 if (drv) i2o_driver_notify_controller_remove_all() 290 i2o_driver_notify_controller_remove(drv, c); i2o_driver_notify_controller_remove_all() 303 struct i2o_driver *drv; i2o_driver_notify_device_add_all() local 306 drv = i2o_drivers[i]; i2o_driver_notify_device_add_all() 308 if (drv) i2o_driver_notify_device_add_all() 309 i2o_driver_notify_device_add(drv, i2o_dev); i2o_driver_notify_device_add_all() 322 struct i2o_driver *drv; i2o_driver_notify_device_remove_all() local 325 drv = i2o_drivers[i]; i2o_driver_notify_device_remove_all() 327 if (drv) i2o_driver_notify_device_remove_all() 328 i2o_driver_notify_device_remove(drv, i2o_dev); i2o_driver_notify_device_remove_all()
|
H A D | i2o.h | 716 * @drv: I2O driver 721 static inline void i2o_driver_notify_controller_add(struct i2o_driver *drv, i2o_driver_notify_controller_add() argument 724 if (drv->notify_controller_add) i2o_driver_notify_controller_add() 725 drv->notify_controller_add(c); i2o_driver_notify_controller_add() 730 * @drv: I2O driver 735 static inline void i2o_driver_notify_controller_remove(struct i2o_driver *drv, i2o_driver_notify_controller_remove() argument 738 if (drv->notify_controller_remove) i2o_driver_notify_controller_remove() 739 drv->notify_controller_remove(c); i2o_driver_notify_controller_remove() 744 * @drv: I2O driver 749 static inline void i2o_driver_notify_device_add(struct i2o_driver *drv, i2o_driver_notify_device_add() argument 752 if (drv->notify_device_add) i2o_driver_notify_device_add() 753 drv->notify_device_add(i2o_dev); i2o_driver_notify_device_add() 758 * @drv: I2O driver 763 static inline void i2o_driver_notify_device_remove(struct i2o_driver *drv, i2o_driver_notify_device_remove() argument 766 if (drv->notify_device_remove) i2o_driver_notify_device_remove() 767 drv->notify_device_remove(i2o_dev); i2o_driver_notify_device_remove() 783 #define to_i2o_driver(drv) container_of(drv,struct i2o_driver, driver)
|
/linux-4.1.27/drivers/watchdog/ |
H A D | mena21_wdt.c | 45 static unsigned int a21_wdt_get_bootstatus(struct a21_wdt_drv *drv) a21_wdt_get_bootstatus() argument 49 reset |= gpio_get_value(drv->gpios[GPIO_WD_RST0]) ? (1 << 0) : 0; a21_wdt_get_bootstatus() 50 reset |= gpio_get_value(drv->gpios[GPIO_WD_RST1]) ? (1 << 1) : 0; a21_wdt_get_bootstatus() 51 reset |= gpio_get_value(drv->gpios[GPIO_WD_RST2]) ? (1 << 2) : 0; a21_wdt_get_bootstatus() 58 struct a21_wdt_drv *drv = watchdog_get_drvdata(wdt); a21_wdt_start() local 60 mutex_lock(&drv->lock); a21_wdt_start() 62 gpio_set_value(drv->gpios[GPIO_WD_ENAB], 1); a21_wdt_start() 64 mutex_unlock(&drv->lock); a21_wdt_start() 71 struct a21_wdt_drv *drv = watchdog_get_drvdata(wdt); a21_wdt_stop() local 73 mutex_lock(&drv->lock); a21_wdt_stop() 75 gpio_set_value(drv->gpios[GPIO_WD_ENAB], 0); a21_wdt_stop() 77 mutex_unlock(&drv->lock); a21_wdt_stop() 84 struct a21_wdt_drv *drv = watchdog_get_drvdata(wdt); a21_wdt_ping() local 86 mutex_lock(&drv->lock); a21_wdt_ping() 88 gpio_set_value(drv->gpios[GPIO_WD_TRIG], 0); a21_wdt_ping() 90 gpio_set_value(drv->gpios[GPIO_WD_TRIG], 1); a21_wdt_ping() 92 mutex_unlock(&drv->lock); a21_wdt_ping() 100 struct a21_wdt_drv *drv = watchdog_get_drvdata(wdt); a21_wdt_set_timeout() local 113 mutex_lock(&drv->lock); a21_wdt_set_timeout() 116 gpio_set_value(drv->gpios[GPIO_WD_FAST], 1); a21_wdt_set_timeout() 118 gpio_set_value(drv->gpios[GPIO_WD_FAST], 0); a21_wdt_set_timeout() 122 mutex_unlock(&drv->lock); a21_wdt_set_timeout() 150 struct a21_wdt_drv *drv; a21_wdt_probe() local 156 drv = devm_kzalloc(&pdev->dev, sizeof(struct a21_wdt_drv), GFP_KERNEL); a21_wdt_probe() 157 if (!drv) a21_wdt_probe() 177 drv->gpios[i] = val; a21_wdt_probe() 182 ret = devm_gpio_request(&pdev->dev, drv->gpios[i], a21_wdt_probe() 188 ret = gpio_direction_output(drv->gpios[i], a21_wdt_probe() 189 gpio_get_value(drv->gpios[i])); a21_wdt_probe() 191 ret = gpio_direction_input(drv->gpios[i]); a21_wdt_probe() 196 mutex_init(&drv->lock); a21_wdt_probe() 199 watchdog_set_drvdata(&a21_wdt, drv); a21_wdt_probe() 201 reset = a21_wdt_get_bootstatus(drv); a21_wdt_probe() 217 dev_set_drvdata(&pdev->dev, drv); a21_wdt_probe() 224 mutex_destroy(&drv->lock); a21_wdt_probe() 231 struct a21_wdt_drv *drv = dev_get_drvdata(&pdev->dev); a21_wdt_remove() local 236 watchdog_unregister_device(&drv->wdt); a21_wdt_remove() 238 mutex_destroy(&drv->lock); a21_wdt_remove() 245 struct a21_wdt_drv *drv = dev_get_drvdata(&pdev->dev); a21_wdt_shutdown() local 247 gpio_set_value(drv->gpios[GPIO_WD_ENAB], 0); a21_wdt_shutdown()
|
/linux-4.1.27/arch/x86/kernel/apic/ |
H A D | probe_64.c | 31 struct apic **drv; default_setup_apic_routing() local 35 for (drv = __apicdrivers; drv < __apicdrivers_end; drv++) { default_setup_apic_routing() 36 if ((*drv)->probe && (*drv)->probe()) { default_setup_apic_routing() 37 if (apic != *drv) { default_setup_apic_routing() 38 apic = *drv; default_setup_apic_routing() 59 struct apic **drv; default_acpi_madt_oem_check() local 61 for (drv = __apicdrivers; drv < __apicdrivers_end; drv++) { default_acpi_madt_oem_check() 62 if ((*drv)->acpi_madt_oem_check(oem_id, oem_table_id)) { default_acpi_madt_oem_check() 63 if (apic != *drv) { default_acpi_madt_oem_check() 64 apic = *drv; default_acpi_madt_oem_check()
|
H A D | probe_32.c | 136 struct apic **drv; parse_apic() local 141 for (drv = __apicdrivers; drv < __apicdrivers_end; drv++) { parse_apic() 142 if (!strcmp((*drv)->name, arg)) { parse_apic() 143 apic = *drv; parse_apic() 193 struct apic **drv; generic_apic_probe() local 195 for (drv = __apicdrivers; drv < __apicdrivers_end; drv++) { generic_apic_probe() 196 if ((*drv)->probe()) { generic_apic_probe() 197 apic = *drv; generic_apic_probe() 202 if (drv == __apicdrivers_end) generic_apic_probe() 211 struct apic **drv; default_acpi_madt_oem_check() local 213 for (drv = __apicdrivers; drv < __apicdrivers_end; drv++) { default_acpi_madt_oem_check() 214 if (!(*drv)->acpi_madt_oem_check) default_acpi_madt_oem_check() 216 if (!(*drv)->acpi_madt_oem_check(oem_id, oem_table_id)) default_acpi_madt_oem_check() 220 apic = *drv; default_acpi_madt_oem_check()
|
/linux-4.1.27/drivers/phy/ |
H A D | phy-samsung-usb2.c | 25 struct samsung_usb2_phy_driver *drv = inst->drv; samsung_usb2_phy_power_on() local 28 dev_dbg(drv->dev, "Request to power_on \"%s\" usb phy\n", samsung_usb2_phy_power_on() 30 ret = clk_prepare_enable(drv->clk); samsung_usb2_phy_power_on() 33 ret = clk_prepare_enable(drv->ref_clk); samsung_usb2_phy_power_on() 37 spin_lock(&drv->lock); samsung_usb2_phy_power_on() 39 spin_unlock(&drv->lock); samsung_usb2_phy_power_on() 47 clk_disable_unprepare(drv->ref_clk); samsung_usb2_phy_power_on() 49 clk_disable_unprepare(drv->clk); samsung_usb2_phy_power_on() 57 struct samsung_usb2_phy_driver *drv = inst->drv; samsung_usb2_phy_power_off() local 60 dev_dbg(drv->dev, "Request to power_off \"%s\" usb phy\n", samsung_usb2_phy_power_off() 63 spin_lock(&drv->lock); samsung_usb2_phy_power_off() 65 spin_unlock(&drv->lock); samsung_usb2_phy_power_off() 69 clk_disable_unprepare(drv->ref_clk); samsung_usb2_phy_power_off() 70 clk_disable_unprepare(drv->clk); samsung_usb2_phy_power_off() 83 struct samsung_usb2_phy_driver *drv; samsung_usb2_phy_xlate() local 85 drv = dev_get_drvdata(dev); samsung_usb2_phy_xlate() 86 if (!drv) samsung_usb2_phy_xlate() 89 if (WARN_ON(args->args[0] >= drv->cfg->num_phys)) samsung_usb2_phy_xlate() 92 return drv->instances[args->args[0]].phy; samsung_usb2_phy_xlate() 137 struct samsung_usb2_phy_driver *drv; samsung_usb2_phy_probe() local 152 drv = devm_kzalloc(dev, sizeof(struct samsung_usb2_phy_driver) + samsung_usb2_phy_probe() 155 if (!drv) samsung_usb2_phy_probe() 158 dev_set_drvdata(dev, drv); samsung_usb2_phy_probe() 159 spin_lock_init(&drv->lock); samsung_usb2_phy_probe() 161 drv->cfg = cfg; samsung_usb2_phy_probe() 162 drv->dev = dev; samsung_usb2_phy_probe() 165 drv->reg_phy = devm_ioremap_resource(dev, mem); samsung_usb2_phy_probe() 166 if (IS_ERR(drv->reg_phy)) { samsung_usb2_phy_probe() 168 return PTR_ERR(drv->reg_phy); samsung_usb2_phy_probe() 171 drv->reg_pmu = syscon_regmap_lookup_by_phandle(pdev->dev.of_node, samsung_usb2_phy_probe() 173 if (IS_ERR(drv->reg_pmu)) { samsung_usb2_phy_probe() 175 return PTR_ERR(drv->reg_pmu); samsung_usb2_phy_probe() 178 if (drv->cfg->has_mode_switch) { samsung_usb2_phy_probe() 179 drv->reg_sys = syscon_regmap_lookup_by_phandle( samsung_usb2_phy_probe() 181 if (IS_ERR(drv->reg_sys)) { samsung_usb2_phy_probe() 183 return PTR_ERR(drv->reg_sys); samsung_usb2_phy_probe() 187 drv->clk = devm_clk_get(dev, "phy"); samsung_usb2_phy_probe() 188 if (IS_ERR(drv->clk)) { samsung_usb2_phy_probe() 190 return PTR_ERR(drv->clk); samsung_usb2_phy_probe() 193 drv->ref_clk = devm_clk_get(dev, "ref"); samsung_usb2_phy_probe() 194 if (IS_ERR(drv->ref_clk)) { samsung_usb2_phy_probe() 196 return PTR_ERR(drv->ref_clk); samsung_usb2_phy_probe() 199 drv->ref_rate = clk_get_rate(drv->ref_clk); samsung_usb2_phy_probe() 200 if (drv->cfg->rate_to_clk) { samsung_usb2_phy_probe() 201 ret = drv->cfg->rate_to_clk(drv->ref_rate, &drv->ref_reg_val); samsung_usb2_phy_probe() 206 for (i = 0; i < drv->cfg->num_phys; i++) { samsung_usb2_phy_probe() 207 char *label = drv->cfg->phys[i].label; samsung_usb2_phy_probe() 208 struct samsung_usb2_phy_instance *p = &drv->instances[i]; samsung_usb2_phy_probe() 213 dev_err(drv->dev, "Failed to create usb2_phy \"%s\"\n", samsung_usb2_phy_probe() 218 p->cfg = &drv->cfg->phys[i]; samsung_usb2_phy_probe() 219 p->drv = drv; samsung_usb2_phy_probe() 227 dev_err(drv->dev, "Failed to register phy provider\n"); samsung_usb2_phy_probe()
|
H A D | phy-rcar-gen2.c | 57 struct rcar_gen2_phy_driver *drv; member in struct:rcar_gen2_channel 75 struct rcar_gen2_phy_driver *drv = channel->drv; rcar_gen2_phy_init() local 88 clk_prepare_enable(drv->clk); rcar_gen2_phy_init() 90 spin_lock_irqsave(&drv->lock, flags); rcar_gen2_phy_init() 91 ugctrl2 = readl(drv->base + USBHS_UGCTRL2); rcar_gen2_phy_init() 94 writel(ugctrl2, drv->base + USBHS_UGCTRL2); rcar_gen2_phy_init() 95 spin_unlock_irqrestore(&drv->lock, flags); rcar_gen2_phy_init() 104 clk_disable_unprepare(channel->drv->clk); rcar_gen2_phy_exit() 114 struct rcar_gen2_phy_driver *drv = phy->channel->drv; rcar_gen2_phy_power_on() local 115 void __iomem *base = drv->base; rcar_gen2_phy_power_on() 124 spin_lock_irqsave(&drv->lock, flags); rcar_gen2_phy_power_on() 150 spin_unlock_irqrestore(&drv->lock, flags); rcar_gen2_phy_power_on() 158 struct rcar_gen2_phy_driver *drv = phy->channel->drv; rcar_gen2_phy_power_off() local 159 void __iomem *base = drv->base; rcar_gen2_phy_power_off() 167 spin_lock_irqsave(&drv->lock, flags); rcar_gen2_phy_power_off() 182 spin_unlock_irqrestore(&drv->lock, flags); rcar_gen2_phy_power_off() 205 struct rcar_gen2_phy_driver *drv; rcar_gen2_phy_xlate() local 214 drv = dev_get_drvdata(dev); rcar_gen2_phy_xlate() 215 if (!drv) rcar_gen2_phy_xlate() 218 for (i = 0; i < drv->num_channels; i++) { rcar_gen2_phy_xlate() 219 if (np == drv->channels[i].of_node) rcar_gen2_phy_xlate() 223 if (i >= drv->num_channels || args->args[0] >= 2) rcar_gen2_phy_xlate() 226 return drv->channels[i].phys[args->args[0]].phy; rcar_gen2_phy_xlate() 242 struct rcar_gen2_phy_driver *drv; rcar_gen2_phy_probe() local 267 drv = devm_kzalloc(dev, sizeof(*drv), GFP_KERNEL); rcar_gen2_phy_probe() 268 if (!drv) rcar_gen2_phy_probe() 271 spin_lock_init(&drv->lock); rcar_gen2_phy_probe() 273 drv->clk = clk; rcar_gen2_phy_probe() 274 drv->base = base; rcar_gen2_phy_probe() 276 drv->num_channels = of_get_child_count(dev->of_node); rcar_gen2_phy_probe() 277 drv->channels = devm_kcalloc(dev, drv->num_channels, rcar_gen2_phy_probe() 280 if (!drv->channels) rcar_gen2_phy_probe() 284 struct rcar_gen2_channel *channel = drv->channels + i; rcar_gen2_phy_probe() 289 channel->drv = drv; rcar_gen2_phy_probe() 324 dev_set_drvdata(dev, drv); rcar_gen2_phy_probe()
|
H A D | phy-exynos4x12-usb2.c | 170 struct samsung_usb2_phy_driver *drv = inst->drv; exynos4x12_isol() local 192 regmap_update_bits(drv->reg_pmu, offset, mask, on ? 0 : mask); exynos4x12_isol() 197 struct samsung_usb2_phy_driver *drv = inst->drv; exynos4x12_setup_clk() local 200 clk = readl(drv->reg_phy + EXYNOS_4x12_UPHYCLK); exynos4x12_setup_clk() 203 if (drv->cfg->has_refclk_sel) exynos4x12_setup_clk() 206 clk |= drv->ref_reg_val << EXYNOS_4x12_UPHYCLK_PHYFSEL_OFFSET; exynos4x12_setup_clk() 208 writel(clk, drv->reg_phy + EXYNOS_4x12_UPHYCLK); exynos4x12_setup_clk() 213 struct samsung_usb2_phy_driver *drv = inst->drv; exynos4x12_phy_pwr() local 243 pwr = readl(drv->reg_phy + EXYNOS_4x12_UPHYPWR); exynos4x12_phy_pwr() 245 writel(pwr, drv->reg_phy + EXYNOS_4x12_UPHYPWR); exynos4x12_phy_pwr() 247 rst = readl(drv->reg_phy + EXYNOS_4x12_UPHYRST); exynos4x12_phy_pwr() 249 writel(rst, drv->reg_phy + EXYNOS_4x12_UPHYRST); exynos4x12_phy_pwr() 252 writel(rst, drv->reg_phy + EXYNOS_4x12_UPHYRST); exynos4x12_phy_pwr() 257 pwr = readl(drv->reg_phy + EXYNOS_4x12_UPHYPWR); exynos4x12_phy_pwr() 259 writel(pwr, drv->reg_phy + EXYNOS_4x12_UPHYPWR); exynos4x12_phy_pwr() 275 struct samsung_usb2_phy_driver *drv = inst->drv; exynos4x12_power_on() local 281 regmap_update_bits(drv->reg_sys, EXYNOS_4x12_MODE_SWITCH_OFFSET, exynos4x12_power_on() 284 exynos4x12_power_on_int(&drv->instances[EXYNOS4x12_DEVICE]); exynos4x12_power_on() 287 if (inst->cfg->id == EXYNOS4x12_DEVICE && drv->cfg->has_mode_switch) exynos4x12_power_on() 288 regmap_update_bits(drv->reg_sys, EXYNOS_4x12_MODE_SWITCH_OFFSET, exynos4x12_power_on() 294 exynos4x12_power_on_int(&drv->instances[EXYNOS4x12_DEVICE]); exynos4x12_power_on() 295 exynos4x12_power_on_int(&drv->instances[EXYNOS4x12_HOST]); exynos4x12_power_on() 314 struct samsung_usb2_phy_driver *drv = inst->drv; exynos4x12_power_off() local 319 if (inst->cfg->id == EXYNOS4x12_DEVICE && drv->cfg->has_mode_switch) exynos4x12_power_off() 320 regmap_update_bits(drv->reg_sys, EXYNOS_4x12_MODE_SWITCH_OFFSET, exynos4x12_power_off() 325 exynos4x12_power_off_int(&drv->instances[EXYNOS4x12_DEVICE]); exynos4x12_power_off() 329 exynos4x12_power_off_int(&drv->instances[EXYNOS4x12_DEVICE]); exynos4x12_power_off() 330 exynos4x12_power_off_int(&drv->instances[EXYNOS4x12_HOST]); exynos4x12_power_off()
|
H A D | phy-exynos5250-usb2.c | 180 struct samsung_usb2_phy_driver *drv = inst->drv; exynos5250_isol() local 197 regmap_update_bits(drv->reg_pmu, offset, mask, on ? 0 : mask); exynos5250_isol() 202 struct samsung_usb2_phy_driver *drv = inst->drv; exynos5250_power_on() local 211 regmap_update_bits(drv->reg_sys, exynos5250_power_on() 217 otg = readl(drv->reg_phy + EXYNOS_5250_USBOTGSYS); exynos5250_power_on() 220 otg |= drv->ref_reg_val << EXYNOS_5250_USBOTGSYS_FSEL_SHIFT; exynos5250_power_on() 233 writel(otg, drv->reg_phy + EXYNOS_5250_USBOTGSYS); exynos5250_power_on() 239 writel(otg, drv->reg_phy + EXYNOS_5250_USBOTGSYS); exynos5250_power_on() 247 ctrl0 = readl(drv->reg_phy + EXYNOS_5250_HOSTPHYCTRL0); exynos5250_power_on() 250 ctrl0 |= drv->ref_reg_val << exynos5250_power_on() 262 writel(ctrl0, drv->reg_phy + EXYNOS_5250_HOSTPHYCTRL0); exynos5250_power_on() 266 writel(ctrl0, drv->reg_phy + EXYNOS_5250_HOSTPHYCTRL0); exynos5250_power_on() 269 otg = readl(drv->reg_phy + EXYNOS_5250_USBOTGSYS); exynos5250_power_on() 272 otg |= drv->ref_reg_val << EXYNOS_5250_USBOTGSYS_FSEL_SHIFT; exynos5250_power_on() 285 writel(otg, drv->reg_phy + EXYNOS_5250_USBOTGSYS); exynos5250_power_on() 295 writel(hsic, drv->reg_phy + EXYNOS_5250_HSICPHYCTRL1); exynos5250_power_on() 296 writel(hsic, drv->reg_phy + EXYNOS_5250_HSICPHYCTRL2); exynos5250_power_on() 299 writel(hsic, drv->reg_phy + EXYNOS_5250_HSICPHYCTRL1); exynos5250_power_on() 300 writel(hsic, drv->reg_phy + EXYNOS_5250_HSICPHYCTRL2); exynos5250_power_on() 306 ehci = readl(drv->reg_phy + EXYNOS_5250_HOSTEHCICTRL); exynos5250_power_on() 311 writel(ehci, drv->reg_phy + EXYNOS_5250_HOSTEHCICTRL); exynos5250_power_on() 314 ohci = readl(drv->reg_phy + EXYNOS_5250_HOSTOHCICTRL); exynos5250_power_on() 317 writel(ohci, drv->reg_phy + EXYNOS_5250_HOSTOHCICTRL); exynos5250_power_on() 328 struct samsung_usb2_phy_driver *drv = inst->drv; exynos5250_power_off() local 337 otg = readl(drv->reg_phy + EXYNOS_5250_USBOTGSYS); exynos5250_power_off() 341 writel(otg, drv->reg_phy + EXYNOS_5250_USBOTGSYS); exynos5250_power_off() 344 ctrl0 = readl(drv->reg_phy + EXYNOS_5250_HOSTPHYCTRL0); exynos5250_power_off() 350 writel(ctrl0, drv->reg_phy + EXYNOS_5250_HOSTPHYCTRL0); exynos5250_power_off() 360 writel(hsic, drv->reg_phy + EXYNOS_5250_HSICPHYCTRL1); exynos5250_power_off() 361 writel(hsic, drv->reg_phy + EXYNOS_5250_HSICPHYCTRL2); exynos5250_power_off()
|
H A D | phy-s5pv210-usb2.c | 94 struct samsung_usb2_phy_driver *drv = inst->drv; s5pv210_isol() local 108 regmap_update_bits(drv->reg_pmu, S5PV210_USB_ISOL_OFFSET, s5pv210_isol() 114 struct samsung_usb2_phy_driver *drv = inst->drv; s5pv210_phy_pwr() local 133 writel(drv->ref_reg_val, drv->reg_phy + S5PV210_UPHYCLK); s5pv210_phy_pwr() 135 pwr = readl(drv->reg_phy + S5PV210_UPHYPWR); s5pv210_phy_pwr() 137 writel(pwr, drv->reg_phy + S5PV210_UPHYPWR); s5pv210_phy_pwr() 139 rst = readl(drv->reg_phy + S5PV210_UPHYRST); s5pv210_phy_pwr() 141 writel(rst, drv->reg_phy + S5PV210_UPHYRST); s5pv210_phy_pwr() 144 writel(rst, drv->reg_phy + S5PV210_UPHYRST); s5pv210_phy_pwr() 146 pwr = readl(drv->reg_phy + S5PV210_UPHYPWR); s5pv210_phy_pwr() 148 writel(pwr, drv->reg_phy + S5PV210_UPHYPWR); s5pv210_phy_pwr()
|
H A D | phy-exynos4210-usb2.c | 129 struct samsung_usb2_phy_driver *drv = inst->drv; exynos4210_isol() local 146 regmap_update_bits(drv->reg_pmu, offset, mask, on ? 0 : mask); exynos4210_isol() 151 struct samsung_usb2_phy_driver *drv = inst->drv; exynos4210_phy_pwr() local 170 writel(on, drv->reg_phy + EXYNOS_4210_UPHY1CON); exynos4210_phy_pwr() 185 clk = readl(drv->reg_phy + EXYNOS_4210_UPHYCLK); exynos4210_phy_pwr() 187 clk |= drv->ref_reg_val << EXYNOS_4210_UPHYCLK_PHYFSEL_OFFSET; exynos4210_phy_pwr() 188 writel(clk, drv->reg_phy + EXYNOS_4210_UPHYCLK); exynos4210_phy_pwr() 190 pwr = readl(drv->reg_phy + EXYNOS_4210_UPHYPWR); exynos4210_phy_pwr() 192 writel(pwr, drv->reg_phy + EXYNOS_4210_UPHYPWR); exynos4210_phy_pwr() 194 rst = readl(drv->reg_phy + EXYNOS_4210_UPHYRST); exynos4210_phy_pwr() 196 writel(rst, drv->reg_phy + EXYNOS_4210_UPHYRST); exynos4210_phy_pwr() 199 writel(rst, drv->reg_phy + EXYNOS_4210_UPHYRST); exynos4210_phy_pwr() 204 pwr = readl(drv->reg_phy + EXYNOS_4210_UPHYPWR); exynos4210_phy_pwr() 206 writel(pwr, drv->reg_phy + EXYNOS_4210_UPHYPWR); exynos4210_phy_pwr()
|
/linux-4.1.27/arch/powerpc/kernel/ |
H A D | ibmebus.c | 208 int ibmebus_register_driver(struct platform_driver *drv) ibmebus_register_driver() argument 211 ibmebus_create_devices(drv->driver.of_match_table); ibmebus_register_driver() 213 drv->driver.bus = &ibmebus_bus_type; ibmebus_register_driver() 214 return driver_register(&drv->driver); ibmebus_register_driver() 218 void ibmebus_unregister_driver(struct platform_driver *drv) ibmebus_unregister_driver() argument 220 driver_unregister(&drv->driver); ibmebus_unregister_driver() 330 static int ibmebus_bus_bus_match(struct device *dev, struct device_driver *drv) ibmebus_bus_bus_match() argument 332 const struct of_device_id *matches = drv->of_match_table; ibmebus_bus_bus_match() 343 struct platform_driver *drv; ibmebus_bus_device_probe() local 346 drv = to_platform_driver(dev->driver); ibmebus_bus_device_probe() 349 if (!drv->probe) ibmebus_bus_device_probe() 355 error = drv->probe(of_dev); ibmebus_bus_device_probe() 365 struct platform_driver *drv = to_platform_driver(dev->driver); ibmebus_bus_device_remove() local 367 if (dev->driver && drv->remove) ibmebus_bus_device_remove() 368 drv->remove(of_dev); ibmebus_bus_device_remove() 375 struct platform_driver *drv = to_platform_driver(dev->driver); ibmebus_bus_device_shutdown() local 377 if (dev->driver && drv->shutdown) ibmebus_bus_device_shutdown() 378 drv->shutdown(of_dev); ibmebus_bus_device_shutdown() 422 struct platform_driver *drv = to_platform_driver(dev->driver); ibmebus_bus_legacy_suspend() local 425 if (dev->driver && drv->suspend) ibmebus_bus_legacy_suspend() 426 ret = drv->suspend(of_dev, mesg); ibmebus_bus_legacy_suspend() 433 struct platform_driver *drv = to_platform_driver(dev->driver); ibmebus_bus_legacy_resume() local 436 if (dev->driver && drv->resume) ibmebus_bus_legacy_resume() 437 ret = drv->resume(of_dev); ibmebus_bus_legacy_resume() 443 struct device_driver *drv = dev->driver; ibmebus_bus_pm_prepare() local 446 if (drv && drv->pm && drv->pm->prepare) ibmebus_bus_pm_prepare() 447 ret = drv->pm->prepare(dev); ibmebus_bus_pm_prepare() 454 struct device_driver *drv = dev->driver; ibmebus_bus_pm_complete() local 456 if (drv && drv->pm && drv->pm->complete) ibmebus_bus_pm_complete() 457 drv->pm->complete(dev); ibmebus_bus_pm_complete() 464 struct device_driver *drv = dev->driver; ibmebus_bus_pm_suspend() local 467 if (!drv) ibmebus_bus_pm_suspend() 470 if (drv->pm) { ibmebus_bus_pm_suspend() 471 if (drv->pm->suspend) ibmebus_bus_pm_suspend() 472 ret = drv->pm->suspend(dev); ibmebus_bus_pm_suspend() 482 struct device_driver *drv = dev->driver; ibmebus_bus_pm_suspend_noirq() local 485 if (!drv) ibmebus_bus_pm_suspend_noirq() 488 if (drv->pm) { ibmebus_bus_pm_suspend_noirq() 489 if (drv->pm->suspend_noirq) ibmebus_bus_pm_suspend_noirq() 490 ret = drv->pm->suspend_noirq(dev); ibmebus_bus_pm_suspend_noirq() 498 struct device_driver *drv = dev->driver; ibmebus_bus_pm_resume() local 501 if (!drv) ibmebus_bus_pm_resume() 504 if (drv->pm) { ibmebus_bus_pm_resume() 505 if (drv->pm->resume) ibmebus_bus_pm_resume() 506 ret = drv->pm->resume(dev); ibmebus_bus_pm_resume() 516 struct device_driver *drv = dev->driver; ibmebus_bus_pm_resume_noirq() local 519 if (!drv) ibmebus_bus_pm_resume_noirq() 522 if (drv->pm) { ibmebus_bus_pm_resume_noirq() 523 if (drv->pm->resume_noirq) ibmebus_bus_pm_resume_noirq() 524 ret = drv->pm->resume_noirq(dev); ibmebus_bus_pm_resume_noirq() 543 struct device_driver *drv = dev->driver; ibmebus_bus_pm_freeze() local 546 if (!drv) ibmebus_bus_pm_freeze() 549 if (drv->pm) { ibmebus_bus_pm_freeze() 550 if (drv->pm->freeze) ibmebus_bus_pm_freeze() 551 ret = drv->pm->freeze(dev); ibmebus_bus_pm_freeze() 561 struct device_driver *drv = dev->driver; ibmebus_bus_pm_freeze_noirq() local 564 if (!drv) ibmebus_bus_pm_freeze_noirq() 567 if (drv->pm) { ibmebus_bus_pm_freeze_noirq() 568 if (drv->pm->freeze_noirq) ibmebus_bus_pm_freeze_noirq() 569 ret = drv->pm->freeze_noirq(dev); ibmebus_bus_pm_freeze_noirq() 577 struct device_driver *drv = dev->driver; ibmebus_bus_pm_thaw() local 580 if (!drv) ibmebus_bus_pm_thaw() 583 if (drv->pm) { ibmebus_bus_pm_thaw() 584 if (drv->pm->thaw) ibmebus_bus_pm_thaw() 585 ret = drv->pm->thaw(dev); ibmebus_bus_pm_thaw() 595 struct device_driver *drv = dev->driver; ibmebus_bus_pm_thaw_noirq() local 598 if (!drv) ibmebus_bus_pm_thaw_noirq() 601 if (drv->pm) { ibmebus_bus_pm_thaw_noirq() 602 if (drv->pm->thaw_noirq) ibmebus_bus_pm_thaw_noirq() 603 ret = drv->pm->thaw_noirq(dev); ibmebus_bus_pm_thaw_noirq() 611 struct device_driver *drv = dev->driver; ibmebus_bus_pm_poweroff() local 614 if (!drv) ibmebus_bus_pm_poweroff() 617 if (drv->pm) { ibmebus_bus_pm_poweroff() 618 if (drv->pm->poweroff) ibmebus_bus_pm_poweroff() 619 ret = drv->pm->poweroff(dev); ibmebus_bus_pm_poweroff() 629 struct device_driver *drv = dev->driver; ibmebus_bus_pm_poweroff_noirq() local 632 if (!drv) ibmebus_bus_pm_poweroff_noirq() 635 if (drv->pm) { ibmebus_bus_pm_poweroff_noirq() 636 if (drv->pm->poweroff_noirq) ibmebus_bus_pm_poweroff_noirq() 637 ret = drv->pm->poweroff_noirq(dev); ibmebus_bus_pm_poweroff_noirq() 645 struct device_driver *drv = dev->driver; ibmebus_bus_pm_restore() local 648 if (!drv) ibmebus_bus_pm_restore() 651 if (drv->pm) { ibmebus_bus_pm_restore() 652 if (drv->pm->restore) ibmebus_bus_pm_restore() 653 ret = drv->pm->restore(dev); ibmebus_bus_pm_restore() 663 struct device_driver *drv = dev->driver; ibmebus_bus_pm_restore_noirq() local 666 if (!drv) ibmebus_bus_pm_restore_noirq() 669 if (drv->pm) { ibmebus_bus_pm_restore_noirq() 670 if (drv->pm->restore_noirq) ibmebus_bus_pm_restore_noirq() 671 ret = drv->pm->restore_noirq(dev); ibmebus_bus_pm_restore_noirq()
|
/linux-4.1.27/drivers/cpuidle/ |
H A D | driver.c | 40 * @drv: a valid pointer to a struct cpuidle_driver 43 * variable. If @drv is different from the registered driver, the corresponding 46 static inline void __cpuidle_unset_driver(struct cpuidle_driver *drv) __cpuidle_unset_driver() argument 50 for_each_cpu(cpu, drv->cpumask) { __cpuidle_unset_driver() 52 if (drv != __cpuidle_get_cpu_driver(cpu)) __cpuidle_unset_driver() 61 * @drv: a valid pointer to a struct cpuidle_driver 64 * to @drv. 68 static inline int __cpuidle_set_driver(struct cpuidle_driver *drv) __cpuidle_set_driver() argument 72 for_each_cpu(cpu, drv->cpumask) { __cpuidle_set_driver() 75 __cpuidle_unset_driver(drv); __cpuidle_set_driver() 79 per_cpu(cpuidle_drivers, cpu) = drv; __cpuidle_set_driver() 103 * @drv: pointer to a struct cpuidle_driver object 107 static inline int __cpuidle_set_driver(struct cpuidle_driver *drv) __cpuidle_set_driver() argument 112 cpuidle_curr_driver = drv; __cpuidle_set_driver() 119 * @drv: a pointer to a struct cpuidle_driver 121 * Reset the global cpuidle variable to NULL. If @drv does not match the 124 static inline void __cpuidle_unset_driver(struct cpuidle_driver *drv) __cpuidle_unset_driver() argument 126 if (drv == cpuidle_curr_driver) __cpuidle_unset_driver() 151 * @drv: a valid pointer to a struct cpuidle_driver 153 static void __cpuidle_driver_init(struct cpuidle_driver *drv) __cpuidle_driver_init() argument 157 drv->refcnt = 0; __cpuidle_driver_init() 164 if (!drv->cpumask) __cpuidle_driver_init() 165 drv->cpumask = (struct cpumask *)cpu_possible_mask; __cpuidle_driver_init() 172 for (i = drv->state_count - 1; i >= 0 ; i--) { __cpuidle_driver_init() 173 if (drv->states[i].flags & CPUIDLE_FLAG_TIMER_STOP) { __cpuidle_driver_init() 174 drv->bctimer = 1; __cpuidle_driver_init() 182 struct cpuidle_driver *drv, int index) poll_idle() 194 static void poll_idle_init(struct cpuidle_driver *drv) poll_idle_init() argument 196 struct cpuidle_state *state = &drv->states[0]; poll_idle_init() 207 static void poll_idle_init(struct cpuidle_driver *drv) {} poll_idle_init() argument 212 * @drv: a valid pointer to a struct cpuidle_driver poll_idle_init() 223 static int __cpuidle_register_driver(struct cpuidle_driver *drv) __cpuidle_register_driver() argument 227 if (!drv || !drv->state_count) __cpuidle_register_driver() 233 __cpuidle_driver_init(drv); __cpuidle_register_driver() 235 ret = __cpuidle_set_driver(drv); __cpuidle_register_driver() 239 if (drv->bctimer) __cpuidle_register_driver() 240 on_each_cpu_mask(drv->cpumask, cpuidle_setup_broadcast_timer, __cpuidle_register_driver() 243 poll_idle_init(drv); __cpuidle_register_driver() 250 * @drv: a valid pointer to a struct cpuidle_driver 257 static void __cpuidle_unregister_driver(struct cpuidle_driver *drv) __cpuidle_unregister_driver() argument 259 if (WARN_ON(drv->refcnt > 0)) __cpuidle_unregister_driver() 262 if (drv->bctimer) { __cpuidle_unregister_driver() 263 drv->bctimer = 0; __cpuidle_unregister_driver() 264 on_each_cpu_mask(drv->cpumask, cpuidle_setup_broadcast_timer, __cpuidle_unregister_driver() 268 __cpuidle_unset_driver(drv); __cpuidle_unregister_driver() 273 * @drv: a pointer to a valid struct cpuidle_driver 281 int cpuidle_register_driver(struct cpuidle_driver *drv) cpuidle_register_driver() argument 286 ret = __cpuidle_register_driver(drv); cpuidle_register_driver() 295 * @drv: a pointer to a valid struct cpuidle_driver 298 * to [un]register the driver from occuring at the same time. @drv has to 301 void cpuidle_unregister_driver(struct cpuidle_driver *drv) cpuidle_unregister_driver() argument 304 __cpuidle_unregister_driver(drv); cpuidle_unregister_driver() 316 struct cpuidle_driver *drv; cpuidle_get_driver() local 320 drv = __cpuidle_get_cpu_driver(cpu); cpuidle_get_driver() 323 return drv; cpuidle_get_driver() 353 struct cpuidle_driver *drv; cpuidle_driver_ref() local 357 drv = cpuidle_get_driver(); cpuidle_driver_ref() 358 if (drv) cpuidle_driver_ref() 359 drv->refcnt++; cpuidle_driver_ref() 362 return drv; cpuidle_driver_ref() 373 struct cpuidle_driver *drv; cpuidle_driver_unref() local 377 drv = cpuidle_get_driver(); cpuidle_driver_unref() 378 if (drv && !WARN_ON(drv->refcnt <= 0)) cpuidle_driver_unref() 379 drv->refcnt--; cpuidle_driver_unref() 181 poll_idle(struct cpuidle_device *dev, struct cpuidle_driver *drv, int index) poll_idle() argument
|
H A D | dt_idle_states.h | 4 int dt_init_idle_driver(struct cpuidle_driver *drv,
|
H A D | cpuidle.c | 47 bool cpuidle_not_available(struct cpuidle_driver *drv, cpuidle_not_available() argument 50 return off || !initialized || !drv || !dev || !dev->enabled; cpuidle_not_available() 61 struct cpuidle_driver *drv = cpuidle_get_cpu_driver(dev); cpuidle_play_dead() local 64 if (!drv) cpuidle_play_dead() 68 for (i = drv->state_count - 1; i >= CPUIDLE_DRIVER_STATE_START; i--) cpuidle_play_dead() 69 if (drv->states[i].enter_dead) cpuidle_play_dead() 70 return drv->states[i].enter_dead(dev, i); cpuidle_play_dead() 75 static int find_deepest_state(struct cpuidle_driver *drv, find_deepest_state() argument 81 for (i = CPUIDLE_DRIVER_STATE_START; i < drv->state_count; i++) { find_deepest_state() 82 struct cpuidle_state *s = &drv->states[i]; find_deepest_state() 97 * @drv: cpuidle driver for the given CPU. 100 int cpuidle_find_deepest_state(struct cpuidle_driver *drv, cpuidle_find_deepest_state() argument 103 return find_deepest_state(drv, dev, false); cpuidle_find_deepest_state() 106 static void enter_freeze_proper(struct cpuidle_driver *drv, enter_freeze_proper() argument 115 drv->states[index].enter_freeze(dev, drv, index); enter_freeze_proper() 127 * @drv: cpuidle driver for the given CPU. 133 int cpuidle_enter_freeze(struct cpuidle_driver *drv, struct cpuidle_device *dev) cpuidle_enter_freeze() argument 142 index = find_deepest_state(drv, dev, true); cpuidle_enter_freeze() 144 enter_freeze_proper(drv, dev, index); cpuidle_enter_freeze() 152 * @drv: cpuidle driver for this cpu 153 * @next_state: index into drv->states of the state to enter 155 int cpuidle_enter_state(struct cpuidle_device *dev, struct cpuidle_driver *drv, cpuidle_enter_state() argument 160 struct cpuidle_state *target_state = &drv->states[index]; cpuidle_enter_state() 176 entered_state = target_state->enter(dev, drv, index); cpuidle_enter_state() 188 if (!cpuidle_state_is_coupled(drv, index)) cpuidle_enter_state() 214 * @drv: the cpuidle driver 219 int cpuidle_select(struct cpuidle_driver *drv, struct cpuidle_device *dev) cpuidle_select() argument 221 return cpuidle_curr_governor->select(drv, dev); cpuidle_select() 227 * @drv: the cpuidle driver tied with the cpu 234 int cpuidle_enter(struct cpuidle_driver *drv, struct cpuidle_device *dev, cpuidle_enter() argument 237 if (cpuidle_state_is_coupled(drv, index)) cpuidle_enter() 238 return cpuidle_enter_state_coupled(dev, drv, index); cpuidle_enter() 239 return cpuidle_enter_state(dev, drv, index); cpuidle_enter() 333 struct cpuidle_driver *drv; cpuidle_enable_device() local 341 drv = cpuidle_get_cpu_driver(dev); cpuidle_enable_device() 343 if (!drv || !cpuidle_curr_governor) cpuidle_enable_device() 354 (ret = cpuidle_curr_governor->enable(drv, dev))) cpuidle_enable_device() 381 struct cpuidle_driver *drv = cpuidle_get_cpu_driver(dev); cpuidle_disable_device() local 386 if (!drv || !cpuidle_curr_governor) cpuidle_disable_device() 392 cpuidle_curr_governor->disable(drv, dev); cpuidle_disable_device() 402 struct cpuidle_driver *drv = cpuidle_get_cpu_driver(dev); __cpuidle_unregister_device() local 406 module_put(drv->owner); __cpuidle_unregister_device() 427 struct cpuidle_driver *drv = cpuidle_get_cpu_driver(dev); __cpuidle_register_device() local 429 if (!try_module_get(drv->owner)) __cpuidle_register_device() 519 * @drv: a valid pointer to a struct cpuidle_driver 521 void cpuidle_unregister(struct cpuidle_driver *drv) cpuidle_unregister() argument 526 for_each_cpu(cpu, drv->cpumask) { cpuidle_unregister() 531 cpuidle_unregister_driver(drv); cpuidle_unregister() 541 * @drv : a valid pointer to a struct cpuidle_driver 546 int cpuidle_register(struct cpuidle_driver *drv, cpuidle_register() argument 552 ret = cpuidle_register_driver(drv); cpuidle_register() 558 for_each_cpu(cpu, drv->cpumask) { cpuidle_register() 577 cpuidle_unregister(drv); cpuidle_register()
|
H A D | cpuidle.h | 16 struct cpuidle_driver *drv, int next_state); 37 bool cpuidle_state_is_coupled(struct cpuidle_driver *drv, int state); 39 struct cpuidle_driver *drv, int next_state); 44 bool cpuidle_state_is_coupled(struct cpuidle_driver *drv, int state) cpuidle_state_is_coupled() argument 50 struct cpuidle_driver *drv, int next_state) cpuidle_enter_state_coupled() 49 cpuidle_enter_state_coupled(struct cpuidle_device *dev, struct cpuidle_driver *drv, int next_state) cpuidle_enter_state_coupled() argument
|
H A D | cpuidle-arm.c | 30 * drv: cpuidle driver 37 struct cpuidle_driver *drv, int idx) arm_enter_idle_state() 97 struct cpuidle_driver *drv = &arm_idle_driver; arm_idle_init() local 106 ret = dt_init_idle_driver(drv, arm_idle_state_match, 1); arm_idle_init() 110 ret = cpuidle_register_driver(drv); arm_idle_init() 159 cpuidle_unregister_driver(drv); 36 arm_enter_idle_state(struct cpuidle_device *dev, struct cpuidle_driver *drv, int idx) arm_enter_idle_state() argument
|
H A D | cpuidle-powernv.c | 34 struct cpuidle_driver *drv, snooze_loop() 54 struct cpuidle_driver *drv, nap_loop() 66 struct cpuidle_driver *drv, fastsleep_loop() 141 struct cpuidle_driver *drv = &powernv_idle_driver; powernv_cpuidle_driver_init() local 143 drv->state_count = 0; powernv_cpuidle_driver_init() 150 drv->states[drv->state_count] = /* structure copy */ powernv_cpuidle_driver_init() 153 drv->state_count += 1; powernv_cpuidle_driver_init() 33 snooze_loop(struct cpuidle_device *dev, struct cpuidle_driver *drv, int index) snooze_loop() argument 53 nap_loop(struct cpuidle_device *dev, struct cpuidle_driver *drv, int index) nap_loop() argument 65 fastsleep_loop(struct cpuidle_device *dev, struct cpuidle_driver *drv, int index) fastsleep_loop() argument
|
H A D | cpuidle-pseries.c | 57 struct cpuidle_driver *drv, snooze_loop() 98 struct cpuidle_driver *drv, dedicated_cede_loop() 117 struct cpuidle_driver *drv, shared_cede_loop() 208 struct cpuidle_driver *drv = &pseries_idle_driver; pseries_cpuidle_driver_init() local 210 drv->state_count = 0; pseries_cpuidle_driver_init() 217 drv->states[drv->state_count] = /* structure copy */ pseries_cpuidle_driver_init() 220 drv->state_count += 1; pseries_cpuidle_driver_init() 56 snooze_loop(struct cpuidle_device *dev, struct cpuidle_driver *drv, int index) snooze_loop() argument 97 dedicated_cede_loop(struct cpuidle_device *dev, struct cpuidle_driver *drv, int index) dedicated_cede_loop() argument 116 shared_cede_loop(struct cpuidle_device *dev, struct cpuidle_driver *drv, int index) shared_cede_loop() argument
|
H A D | cpuidle-exynos.c | 31 struct cpuidle_driver *drv, exynos_enter_coupled_lowpower() 62 struct cpuidle_driver *drv, exynos_enter_lowpower() 69 new_index = drv->safe_state_index; exynos_enter_lowpower() 72 return arm_cpuidle_simple_enter(dev, drv, new_index); exynos_enter_lowpower() 30 exynos_enter_coupled_lowpower(struct cpuidle_device *dev, struct cpuidle_driver *drv, int index) exynos_enter_coupled_lowpower() argument 61 exynos_enter_lowpower(struct cpuidle_device *dev, struct cpuidle_driver *drv, int index) exynos_enter_lowpower() argument
|
H A D | sysfs.c | 55 struct cpuidle_driver *drv; show_current_driver() local 58 drv = cpuidle_get_driver(); show_current_driver() 59 if (drv) show_current_driver() 60 ret = sprintf(buf, "%s\n", drv->name); show_current_driver() 401 struct cpuidle_driver *drv = cpuidle_get_cpu_driver(device); cpuidle_add_state_sysfs() local 404 for (i = 0; i < drv->state_count; i++) { cpuidle_add_state_sysfs() 408 kobj->state = &drv->states[i]; cpuidle_add_state_sysfs() 436 struct cpuidle_driver *drv = cpuidle_get_cpu_driver(device); cpuidle_remove_state_sysfs() local 439 for (i = 0; i < drv->state_count; i++) cpuidle_remove_state_sysfs() 452 struct cpuidle_driver *drv; member in struct:cpuidle_driver_kobj 463 static ssize_t show_driver_name(struct cpuidle_driver *drv, char *buf) show_driver_name() argument 468 ret = sprintf(buf, "%s\n", drv ? drv->name : "none"); show_driver_name() 488 ret = dattr->show(driver_kobj->drv, buf); cpuidle_driver_show() 501 ret = dattr->store(driver_kobj->drv, buf, size); cpuidle_driver_store() 532 struct cpuidle_driver *drv = cpuidle_get_cpu_driver(dev); cpuidle_add_driver_sysfs() local 539 kdrv->drv = drv; cpuidle_add_driver_sysfs()
|
H A D | cpuidle-clps711x.c | 23 struct cpuidle_driver *drv, int index) clps711x_cpuidle_halt() 22 clps711x_cpuidle_halt(struct cpuidle_device *dev, struct cpuidle_driver *drv, int index) clps711x_cpuidle_halt() argument
|
H A D | cpuidle-mvebu-v7.c | 29 struct cpuidle_driver *drv, mvebu_v7_enter_idle() 36 if (drv->states[index].flags & MVEBU_V7_FLAG_DEEP_IDLE) mvebu_v7_enter_idle() 28 mvebu_v7_enter_idle(struct cpuidle_device *dev, struct cpuidle_driver *drv, int index) mvebu_v7_enter_idle() argument
|
H A D | dt_idle_states.c | 132 * @drv: Pointer to CPU idle driver to be initialized 140 * struct cpuidle_driver *drv, 151 int dt_init_idle_driver(struct cpuidle_driver *drv, dt_init_idle_driver() argument 169 cpumask = drv->cpumask ? : cpu_possible_mask; dt_init_idle_driver() 192 idle_state = &drv->states[state_idx++]; dt_init_idle_driver() 212 drv->state_count = state_idx; dt_init_idle_driver()
|
H A D | cpuidle-big_little.c | 30 struct cpuidle_driver *drv, int idx); 126 * @drv: The target state to be programmed 133 struct cpuidle_driver *drv, int idx) bl_enter_powerdown() 147 static int __init bl_idle_driver_init(struct cpuidle_driver *drv, int part_id) bl_idle_driver_init() argument 160 drv->cpumask = cpumask; bl_idle_driver_init() 132 bl_enter_powerdown(struct cpuidle_device *dev, struct cpuidle_driver *drv, int idx) bl_enter_powerdown() argument
|
/linux-4.1.27/drivers/usb/c67x00/ |
H A D | Makefile | 7 c67x00-y := c67x00-drv.o c67x00-ll-hpi.o c67x00-hcd.o c67x00-sched.o
|
/linux-4.1.27/include/scsi/ |
H A D | scsi_driver.h | 20 #define to_scsi_driver(drv) \ 21 container_of((drv), struct scsi_driver, gendrv) 24 #define scsi_unregister_driver(drv) \ 25 driver_unregister(drv);
|
/linux-4.1.27/drivers/nfc/ |
H A D | nfcwilink.c | 124 static void nfcwilink_fw_download_receive(struct nfcwilink *drv, nfcwilink_fw_download_receive() argument 132 memcpy(&drv->nfcc_info, rsp, nfcwilink_fw_download_receive() 138 complete(&drv->completed); nfcwilink_fw_download_receive() 141 static int nfcwilink_get_bts_file_name(struct nfcwilink *drv, char *file_name) nfcwilink_get_bts_file_name() argument 151 nfc_err(&drv->pdev->dev, nfcwilink_get_bts_file_name() 162 drv->nfcc_info.plen = 0; nfcwilink_get_bts_file_name() 164 rc = nfcwilink_send(drv->ndev, skb); nfcwilink_get_bts_file_name() 168 comp_ret = wait_for_completion_timeout(&drv->completed, nfcwilink_get_bts_file_name() 170 dev_dbg(&drv->pdev->dev, "wait_for_completion_timeout returned %ld\n", nfcwilink_get_bts_file_name() 173 nfc_err(&drv->pdev->dev, nfcwilink_get_bts_file_name() 178 dev_dbg(&drv->pdev->dev, "nci_vs_nfcc_info_rsp: plen %d, status %d\n", nfcwilink_get_bts_file_name() 179 drv->nfcc_info.plen, drv->nfcc_info.status); nfcwilink_get_bts_file_name() 181 if ((drv->nfcc_info.plen != 5) || (drv->nfcc_info.status != 0)) { nfcwilink_get_bts_file_name() 182 nfc_err(&drv->pdev->dev, "invalid nci_vs_nfcc_info_rsp\n"); nfcwilink_get_bts_file_name() 188 drv->nfcc_info.hw_id, nfcwilink_get_bts_file_name() 189 drv->nfcc_info.sw_ver_x, nfcwilink_get_bts_file_name() 190 drv->nfcc_info.sw_ver_z, nfcwilink_get_bts_file_name() 191 drv->nfcc_info.patch_id); nfcwilink_get_bts_file_name() 193 nfc_info(&drv->pdev->dev, "nfcwilink FW file name: %s\n", file_name); nfcwilink_get_bts_file_name() 198 static int nfcwilink_send_bts_cmd(struct nfcwilink *drv, __u8 *data, int len) nfcwilink_send_bts_cmd() argument 210 nfc_err(&drv->pdev->dev, nfcwilink_send_bts_cmd() 222 nfc_err(&drv->pdev->dev, "no memory for bts cmd\n"); nfcwilink_send_bts_cmd() 228 rc = nfcwilink_send(drv->ndev, skb); nfcwilink_send_bts_cmd() 232 comp_ret = wait_for_completion_timeout(&drv->completed, nfcwilink_send_bts_cmd() 234 dev_dbg(&drv->pdev->dev, "wait_for_completion_timeout returned %ld\n", nfcwilink_send_bts_cmd() 237 nfc_err(&drv->pdev->dev, nfcwilink_send_bts_cmd() 245 static int nfcwilink_download_fw(struct nfcwilink *drv) nfcwilink_download_fw() argument 253 set_bit(NFCWILINK_FW_DOWNLOAD, &drv->flags); nfcwilink_download_fw() 255 rc = nfcwilink_get_bts_file_name(drv, file_name); nfcwilink_download_fw() 259 rc = request_firmware(&fw, file_name, &drv->pdev->dev); nfcwilink_download_fw() 261 nfc_err(&drv->pdev->dev, "request_firmware failed %d\n", rc); nfcwilink_download_fw() 274 dev_dbg(&drv->pdev->dev, nfcwilink_download_fw() 281 nfc_err(&drv->pdev->dev, "wrong bts magic number\n"); nfcwilink_download_fw() 296 dev_dbg(&drv->pdev->dev, "bts_file_action type %d, len %d\n", nfcwilink_download_fw() 301 rc = nfcwilink_send_bts_cmd(drv, nfcwilink_download_fw() 318 clear_bit(NFCWILINK_FW_DOWNLOAD, &drv->flags); nfcwilink_download_fw() 325 struct nfcwilink *drv = priv_data; nfcwilink_register_complete() local 328 drv->st_register_cb_status = data; nfcwilink_register_complete() 331 complete(&drv->completed); nfcwilink_register_complete() 337 struct nfcwilink *drv = priv_data; nfcwilink_receive() local 343 if (!drv) { nfcwilink_receive() 348 dev_dbg(&drv->pdev->dev, "receive entry, len %d\n", skb->len); nfcwilink_receive() 354 if (test_bit(NFCWILINK_FW_DOWNLOAD, &drv->flags)) { nfcwilink_receive() 355 nfcwilink_fw_download_receive(drv, skb); nfcwilink_receive() 360 rc = nci_recv_frame(drv->ndev, skb); nfcwilink_receive() 362 nfc_err(&drv->pdev->dev, "nci_recv_frame failed %d\n", rc); nfcwilink_receive() 384 struct nfcwilink *drv = nci_get_drvdata(ndev); nfcwilink_open() local 388 if (test_and_set_bit(NFCWILINK_RUNNING, &drv->flags)) { nfcwilink_open() 393 nfcwilink_proto.priv_data = drv; nfcwilink_open() 395 init_completion(&drv->completed); nfcwilink_open() 396 drv->st_register_cb_status = -EINPROGRESS; nfcwilink_open() 402 &drv->completed, nfcwilink_open() 405 dev_dbg(&drv->pdev->dev, nfcwilink_open() 413 } else if (drv->st_register_cb_status != 0) { nfcwilink_open() 414 rc = drv->st_register_cb_status; nfcwilink_open() 415 nfc_err(&drv->pdev->dev, nfcwilink_open() 420 nfc_err(&drv->pdev->dev, "st_register failed %d\n", rc); nfcwilink_open() 427 drv->st_write = nfcwilink_proto.write; nfcwilink_open() 429 if (nfcwilink_download_fw(drv)) { nfcwilink_open() 430 nfc_err(&drv->pdev->dev, "nfcwilink_download_fw failed %d\n", nfcwilink_open() 438 clear_bit(NFCWILINK_RUNNING, &drv->flags); nfcwilink_open() 446 struct nfcwilink *drv = nci_get_drvdata(ndev); nfcwilink_close() local 449 if (!test_and_clear_bit(NFCWILINK_RUNNING, &drv->flags)) nfcwilink_close() 454 nfc_err(&drv->pdev->dev, "st_unregister failed %d\n", rc); nfcwilink_close() 456 drv->st_write = NULL; nfcwilink_close() 463 struct nfcwilink *drv = nci_get_drvdata(ndev); nfcwilink_send() local 467 dev_dbg(&drv->pdev->dev, "send entry, len %d\n", skb->len); nfcwilink_send() 469 if (!test_bit(NFCWILINK_RUNNING, &drv->flags)) { nfcwilink_send() 482 len = drv->st_write(skb); nfcwilink_send() 485 nfc_err(&drv->pdev->dev, "st_write failed %ld\n", len); nfcwilink_send() 500 static struct nfcwilink *drv; nfcwilink_probe() local 504 drv = devm_kzalloc(&pdev->dev, sizeof(struct nfcwilink), GFP_KERNEL); nfcwilink_probe() 505 if (!drv) { nfcwilink_probe() 510 drv->pdev = pdev; nfcwilink_probe() 518 drv->ndev = nci_allocate_device(&nfcwilink_ops, nfcwilink_probe() 522 if (!drv->ndev) { nfcwilink_probe() 528 nci_set_parent_dev(drv->ndev, &pdev->dev); nfcwilink_probe() 529 nci_set_drvdata(drv->ndev, drv); nfcwilink_probe() 531 rc = nci_register_device(drv->ndev); nfcwilink_probe() 537 dev_set_drvdata(&pdev->dev, drv); nfcwilink_probe() 542 nci_free_device(drv->ndev); nfcwilink_probe() 550 struct nfcwilink *drv = dev_get_drvdata(&pdev->dev); nfcwilink_remove() local 553 if (!drv) nfcwilink_remove() 556 ndev = drv->ndev; nfcwilink_remove()
|
/linux-4.1.27/arch/arm/mach-integrator/ |
H A D | lm.h | 10 struct device_driver drv; member in struct:lm_driver 17 int lm_driver_register(struct lm_driver *drv); 18 void lm_driver_unregister(struct lm_driver *drv);
|
H A D | lm.c | 18 #define to_lm_driver(d) container_of(d, struct lm_driver, drv) 20 static int lm_match(struct device *dev, struct device_driver *drv) lm_match() argument 59 int lm_driver_register(struct lm_driver *drv) lm_driver_register() argument 61 drv->drv.bus = &lm_bustype; lm_driver_register() 62 return driver_register(&drv->drv); lm_driver_register() 65 void lm_driver_unregister(struct lm_driver *drv) lm_driver_unregister() argument 67 driver_unregister(&drv->drv); lm_driver_unregister()
|
/linux-4.1.27/drivers/net/wireless/iwlwifi/ |
H A D | iwl-drv.c | 71 #include "iwl-drv.h" 97 * struct iwl_drv - drv common data 98 * @list: list of drv structures using this opmode 134 /* Protects the table contents, i.e. the ops pointer & drv list */ 139 struct list_head drv; /* list of devices using this op_mode */ member in struct:iwlwifi_opmode_table 157 static void iwl_free_fw_desc(struct iwl_drv *drv, struct fw_desc *desc) iwl_free_fw_desc() argument 164 static void iwl_free_fw_img(struct iwl_drv *drv, struct fw_img *img) iwl_free_fw_img() argument 168 iwl_free_fw_desc(drv, &img->sec[i]); iwl_free_fw_img() 171 static void iwl_dealloc_ucode(struct iwl_drv *drv) iwl_dealloc_ucode() argument 175 kfree(drv->fw.dbg_dest_tlv); iwl_dealloc_ucode() 176 for (i = 0; i < ARRAY_SIZE(drv->fw.dbg_conf_tlv); i++) iwl_dealloc_ucode() 177 kfree(drv->fw.dbg_conf_tlv[i]); iwl_dealloc_ucode() 178 for (i = 0; i < ARRAY_SIZE(drv->fw.dbg_trigger_tlv); i++) iwl_dealloc_ucode() 179 kfree(drv->fw.dbg_trigger_tlv[i]); iwl_dealloc_ucode() 182 iwl_free_fw_img(drv, drv->fw.img + i); iwl_dealloc_ucode() 185 static int iwl_alloc_fw_desc(struct iwl_drv *drv, struct fw_desc *desc, iwl_alloc_fw_desc() argument 213 static int iwl_request_firmware(struct iwl_drv *drv, bool first) iwl_request_firmware() argument 215 const char *name_pre = drv->cfg->fw_name_pre; iwl_request_firmware() 220 drv->fw_index = UCODE_EXPERIMENTAL_INDEX; iwl_request_firmware() 222 } else if (drv->fw_index == UCODE_EXPERIMENTAL_INDEX) { iwl_request_firmware() 224 drv->fw_index = drv->cfg->ucode_api_max; iwl_request_firmware() 225 sprintf(tag, "%d", drv->fw_index); iwl_request_firmware() 227 drv->fw_index--; iwl_request_firmware() 228 sprintf(tag, "%d", drv->fw_index); iwl_request_firmware() 231 if (drv->fw_index < drv->cfg->ucode_api_min) { iwl_request_firmware() 232 IWL_ERR(drv, "no suitable firmware found!\n"); iwl_request_firmware() 236 snprintf(drv->firmware_name, sizeof(drv->firmware_name), "%s%s.ucode", iwl_request_firmware() 243 if (drv->trans->cfg->device_family == IWL_DEVICE_FAMILY_8000) { iwl_request_firmware() 244 char rev_step = 'A' + CSR_HW_REV_STEP(drv->trans->hw_rev); iwl_request_firmware() 246 snprintf(drv->firmware_name, sizeof(drv->firmware_name), iwl_request_firmware() 250 IWL_DEBUG_INFO(drv, "attempting to load firmware %s'%s'\n", iwl_request_firmware() 251 (drv->fw_index == UCODE_EXPERIMENTAL_INDEX) iwl_request_firmware() 253 drv->firmware_name); iwl_request_firmware() 255 return request_firmware_nowait(THIS_MODULE, 1, drv->firmware_name, iwl_request_firmware() 256 drv->trans->dev, iwl_request_firmware() 257 GFP_KERNEL, drv, iwl_req_fw_callback); iwl_request_firmware() 403 static int iwl_set_default_calib(struct iwl_drv *drv, const u8 *data) iwl_set_default_calib() argument 409 IWL_ERR(drv, "Wrong ucode_type %u for default calibration.\n", iwl_set_default_calib() 413 drv->fw.default_calib[ucode_type].flow_trigger = iwl_set_default_calib() 415 drv->fw.default_calib[ucode_type].event_trigger = iwl_set_default_calib() 421 static int iwl_set_ucode_api_flags(struct iwl_drv *drv, const u8 *data, iwl_set_ucode_api_flags() argument 428 IWL_ERR(drv, "api_index larger than supported by driver\n"); iwl_set_ucode_api_flags() 437 static int iwl_set_ucode_capabilities(struct iwl_drv *drv, const u8 *data, iwl_set_ucode_capabilities() argument 444 IWL_ERR(drv, "api_index larger than supported by driver\n"); iwl_set_ucode_capabilities() 453 static int iwl_parse_v1_v2_firmware(struct iwl_drv *drv, iwl_parse_v1_v2_firmware() argument 462 drv->fw.ucode_ver = le32_to_cpu(ucode->ver); iwl_parse_v1_v2_firmware() 463 api_ver = IWL_UCODE_API(drv->fw.ucode_ver); iwl_parse_v1_v2_firmware() 469 IWL_ERR(drv, "File size too small!\n"); iwl_parse_v1_v2_firmware() 488 IWL_ERR(drv, "File size too small!\n"); iwl_parse_v1_v2_firmware() 506 (drv->fw_index == UCODE_EXPERIMENTAL_INDEX) iwl_parse_v1_v2_firmware() 511 snprintf(drv->fw.fw_version, iwl_parse_v1_v2_firmware() 512 sizeof(drv->fw.fw_version), iwl_parse_v1_v2_firmware() 514 IWL_UCODE_MAJOR(drv->fw.ucode_ver), iwl_parse_v1_v2_firmware() 515 IWL_UCODE_MINOR(drv->fw.ucode_ver), iwl_parse_v1_v2_firmware() 516 IWL_UCODE_API(drv->fw.ucode_ver), iwl_parse_v1_v2_firmware() 517 IWL_UCODE_SERIAL(drv->fw.ucode_ver), iwl_parse_v1_v2_firmware() 528 IWL_ERR(drv, iwl_parse_v1_v2_firmware() 554 static int iwl_parse_tlv_firmware(struct iwl_drv *drv, iwl_parse_tlv_firmware() argument 573 IWL_ERR(drv, "uCode has invalid length: %zd\n", len); iwl_parse_tlv_firmware() 578 IWL_ERR(drv, "invalid uCode magic: 0X%x\n", iwl_parse_tlv_firmware() 583 drv->fw.ucode_ver = le32_to_cpu(ucode->ver); iwl_parse_tlv_firmware() 584 memcpy(drv->fw.human_readable, ucode->human_readable, iwl_parse_tlv_firmware() 585 sizeof(drv->fw.human_readable)); iwl_parse_tlv_firmware() 590 (drv->fw_index == UCODE_EXPERIMENTAL_INDEX) iwl_parse_tlv_firmware() 595 snprintf(drv->fw.fw_version, iwl_parse_tlv_firmware() 596 sizeof(drv->fw.fw_version), iwl_parse_tlv_firmware() 598 IWL_UCODE_MAJOR(drv->fw.ucode_ver), iwl_parse_tlv_firmware() 599 IWL_UCODE_MINOR(drv->fw.ucode_ver), iwl_parse_tlv_firmware() 600 IWL_UCODE_API(drv->fw.ucode_ver), iwl_parse_tlv_firmware() 601 IWL_UCODE_SERIAL(drv->fw.ucode_ver), iwl_parse_tlv_firmware() 617 IWL_ERR(drv, "invalid TLV len: %zd/%u\n", iwl_parse_tlv_firmware() 662 IWL_ERR(drv, "Found unexpected BOOT ucode\n"); iwl_parse_tlv_firmware() 694 if (iwl_set_ucode_api_flags(drv, tlv_data, capa)) iwl_parse_tlv_firmware() 700 if (iwl_set_ucode_capabilities(drv, tlv_data, capa)) iwl_parse_tlv_firmware() 742 drv->fw.enhance_sensitivity_table = true; iwl_parse_tlv_firmware() 771 drv->fw.mvm_fw = true; iwl_parse_tlv_firmware() 776 drv->fw.mvm_fw = true; iwl_parse_tlv_firmware() 781 drv->fw.mvm_fw = true; iwl_parse_tlv_firmware() 786 if (iwl_set_default_calib(drv, tlv_data)) iwl_parse_tlv_firmware() 792 drv->fw.phy_config = le32_to_cpup((__le32 *)tlv_data); iwl_parse_tlv_firmware() 793 drv->fw.valid_tx_ant = (drv->fw.phy_config & iwl_parse_tlv_firmware() 796 drv->fw.valid_rx_ant = (drv->fw.phy_config & iwl_parse_tlv_firmware() 803 drv->fw.mvm_fw = true; iwl_parse_tlv_firmware() 808 drv->fw.mvm_fw = true; iwl_parse_tlv_firmware() 813 drv->fw.mvm_fw = true; iwl_parse_tlv_firmware() 822 drv->fw.img[IWL_UCODE_REGULAR].is_dual_cpus = iwl_parse_tlv_firmware() 824 drv->fw.img[IWL_UCODE_INIT].is_dual_cpus = iwl_parse_tlv_firmware() 826 drv->fw.img[IWL_UCODE_WOWLAN].is_dual_cpus = iwl_parse_tlv_firmware() 829 IWL_ERR(drv, "Driver support upto 2 CPUs\n"); iwl_parse_tlv_firmware() 834 if (iwl_store_cscheme(&drv->fw, tlv_data, tlv_len)) iwl_parse_tlv_firmware() 855 snprintf(drv->fw.fw_version, iwl_parse_tlv_firmware() 856 sizeof(drv->fw.fw_version), "%u.%u.%u", iwl_parse_tlv_firmware() 864 IWL_ERR(drv, iwl_parse_tlv_firmware() 870 IWL_INFO(drv, "Found debug destination: %s\n", iwl_parse_tlv_firmware() 873 drv->fw.dbg_dest_reg_num = iwl_parse_tlv_firmware() 876 drv->fw.dbg_dest_reg_num /= iwl_parse_tlv_firmware() 877 sizeof(drv->fw.dbg_dest_tlv->reg_ops[0]); iwl_parse_tlv_firmware() 885 IWL_ERR(drv, iwl_parse_tlv_firmware() 891 if (conf->id >= ARRAY_SIZE(drv->fw.dbg_conf_tlv)) { iwl_parse_tlv_firmware() 892 IWL_ERR(drv, iwl_parse_tlv_firmware() 899 IWL_ERR(drv, iwl_parse_tlv_firmware() 908 IWL_INFO(drv, "Found debug configuration: %d\n", iwl_parse_tlv_firmware() 920 if (trigger_id >= ARRAY_SIZE(drv->fw.dbg_trigger_tlv)) { iwl_parse_tlv_firmware() 921 IWL_ERR(drv, iwl_parse_tlv_firmware() 928 IWL_ERR(drv, iwl_parse_tlv_firmware() 934 IWL_INFO(drv, "Found debug trigger: %u\n", trigger->id); iwl_parse_tlv_firmware() 949 drv->fw.sdio_adma_addr = iwl_parse_tlv_firmware() 953 IWL_DEBUG_INFO(drv, "unknown TLV: %d\n", tlv_type); iwl_parse_tlv_firmware() 959 IWL_ERR(drv, iwl_parse_tlv_firmware() 965 IWL_ERR(drv, "invalid TLV after parsing: %zd\n", len); iwl_parse_tlv_firmware() 966 iwl_print_hex_dump(drv, IWL_DL_FW, (u8 *)data, len); iwl_parse_tlv_firmware() 973 IWL_ERR(drv, "TLV %d has invalid size: %u\n", tlv_type, tlv_len); iwl_parse_tlv_firmware() 975 iwl_print_hex_dump(drv, IWL_DL_FW, tlv_data, tlv_len); iwl_parse_tlv_firmware() 980 static int iwl_alloc_ucode(struct iwl_drv *drv, iwl_alloc_ucode() argument 988 if (iwl_alloc_fw_desc(drv, &(drv->fw.img[type].sec[i]), iwl_alloc_ucode() 994 static int validate_sec_sizes(struct iwl_drv *drv, validate_sec_sizes() argument 998 IWL_DEBUG_INFO(drv, "f/w package hdr runtime inst size = %Zd\n", validate_sec_sizes() 1001 IWL_DEBUG_INFO(drv, "f/w package hdr runtime data size = %Zd\n", validate_sec_sizes() 1004 IWL_DEBUG_INFO(drv, "f/w package hdr init inst size = %Zd\n", validate_sec_sizes() 1006 IWL_DEBUG_INFO(drv, "f/w package hdr init data size = %Zd\n", validate_sec_sizes() 1012 IWL_ERR(drv, "uCode instr len %Zd too large to fit in\n", validate_sec_sizes() 1020 IWL_ERR(drv, "uCode data len %Zd too large to fit in\n", validate_sec_sizes() 1028 IWL_ERR(drv, "uCode init instr len %Zd too large to fit in\n", validate_sec_sizes() 1036 IWL_ERR(drv, "uCode init data len %Zd too large to fit in\n", validate_sec_sizes() 1045 _iwl_op_mode_start(struct iwl_drv *drv, struct iwlwifi_opmode_table *op) _iwl_op_mode_start() argument 1052 drv->dbgfs_op_mode = debugfs_create_dir(op->name, _iwl_op_mode_start() 1053 drv->dbgfs_drv); _iwl_op_mode_start() 1054 if (!drv->dbgfs_op_mode) { _iwl_op_mode_start() 1055 IWL_ERR(drv, _iwl_op_mode_start() 1059 dbgfs_dir = drv->dbgfs_op_mode; _iwl_op_mode_start() 1062 op_mode = ops->start(drv->trans, drv->cfg, &drv->fw, dbgfs_dir); _iwl_op_mode_start() 1066 debugfs_remove_recursive(drv->dbgfs_op_mode); _iwl_op_mode_start() 1067 drv->dbgfs_op_mode = NULL; _iwl_op_mode_start() 1074 static void _iwl_op_mode_stop(struct iwl_drv *drv) _iwl_op_mode_stop() argument 1077 if (drv->op_mode) { _iwl_op_mode_stop() 1078 iwl_op_mode_stop(drv->op_mode); _iwl_op_mode_stop() 1079 drv->op_mode = NULL; _iwl_op_mode_stop() 1082 debugfs_remove_recursive(drv->dbgfs_op_mode); _iwl_op_mode_stop() 1083 drv->dbgfs_op_mode = NULL; _iwl_op_mode_stop() 1096 struct iwl_drv *drv = context; iwl_req_fw_callback() local 1097 struct iwl_fw *fw = &drv->fw; iwl_req_fw_callback() 1102 const unsigned int api_max = drv->cfg->ucode_api_max; iwl_req_fw_callback() 1103 unsigned int api_ok = drv->cfg->ucode_api_ok; iwl_req_fw_callback() 1104 const unsigned int api_min = drv->cfg->ucode_api_min; iwl_req_fw_callback() 1123 if (drv->fw_index <= api_ok) iwl_req_fw_callback() 1124 IWL_ERR(drv, iwl_req_fw_callback() 1126 drv->firmware_name); iwl_req_fw_callback() 1130 IWL_DEBUG_INFO(drv, "Loaded firmware file '%s' (%zd bytes).\n", iwl_req_fw_callback() 1131 drv->firmware_name, ucode_raw->size); iwl_req_fw_callback() 1135 IWL_ERR(drv, "File size way too small!\n"); iwl_req_fw_callback() 1143 err = iwl_parse_v1_v2_firmware(drv, ucode_raw, pieces); iwl_req_fw_callback() 1145 err = iwl_parse_tlv_firmware(drv, ucode_raw, pieces, iwl_req_fw_callback() 1151 if (drv->fw.ucode_capa.api[0] & IWL_UCODE_TLV_API_NEW_VERSION) iwl_req_fw_callback() 1152 api_ver = drv->fw.ucode_ver; iwl_req_fw_callback() 1154 api_ver = IWL_UCODE_API(drv->fw.ucode_ver); iwl_req_fw_callback() 1162 if (drv->fw_index != UCODE_EXPERIMENTAL_INDEX) { iwl_req_fw_callback() 1164 IWL_ERR(drv, iwl_req_fw_callback() 1173 IWL_ERR(drv, "Firmware has old API version, " iwl_req_fw_callback() 1177 IWL_ERR(drv, "Firmware has old API version, " iwl_req_fw_callback() 1180 IWL_ERR(drv, "New firmware can be obtained from " iwl_req_fw_callback() 1189 if (!fw->mvm_fw && validate_sec_sizes(drv, pieces, drv->cfg)) iwl_req_fw_callback() 1198 if (iwl_alloc_ucode(drv, pieces, i)) iwl_req_fw_callback() 1202 drv->fw.dbg_dest_tlv = iwl_req_fw_callback() 1206 drv->fw.dbg_dest_reg_num, GFP_KERNEL); iwl_req_fw_callback() 1208 if (!drv->fw.dbg_dest_tlv) iwl_req_fw_callback() 1212 for (i = 0; i < ARRAY_SIZE(drv->fw.dbg_conf_tlv); i++) { iwl_req_fw_callback() 1214 drv->fw.dbg_conf_tlv_len[i] = iwl_req_fw_callback() 1216 drv->fw.dbg_conf_tlv[i] = iwl_req_fw_callback() 1218 drv->fw.dbg_conf_tlv_len[i], iwl_req_fw_callback() 1220 if (!drv->fw.dbg_conf_tlv[i]) iwl_req_fw_callback() 1243 for (i = 0; i < ARRAY_SIZE(drv->fw.dbg_trigger_tlv); i++) { iwl_req_fw_callback() 1256 drv->fw.dbg_trigger_tlv_len[i] = iwl_req_fw_callback() 1258 drv->fw.dbg_trigger_tlv[i] = iwl_req_fw_callback() 1260 drv->fw.dbg_trigger_tlv_len[i], iwl_req_fw_callback() 1262 if (!drv->fw.dbg_trigger_tlv[i]) iwl_req_fw_callback() 1279 drv->cfg->base_params->max_event_log_size; iwl_req_fw_callback() 1286 drv->cfg->base_params->max_event_log_size; iwl_req_fw_callback() 1307 IWL_INFO(drv, "loaded firmware version %s op_mode %s\n", iwl_req_fw_callback() 1308 drv->fw.fw_version, op->name); iwl_req_fw_callback() 1311 list_add_tail(&drv->list, &op->drv); iwl_req_fw_callback() 1314 drv->op_mode = _iwl_op_mode_start(drv, op); iwl_req_fw_callback() 1316 if (!drv->op_mode) { iwl_req_fw_callback() 1330 complete(&drv->request_firmware_complete); iwl_req_fw_callback() 1341 IWL_ERR(drv, iwl_req_fw_callback() 1352 if (iwl_request_firmware(drv, false)) iwl_req_fw_callback() 1358 IWL_ERR(drv, "failed to allocate pci memory\n"); iwl_req_fw_callback() 1359 iwl_dealloc_ucode(drv); iwl_req_fw_callback() 1363 complete(&drv->request_firmware_complete); iwl_req_fw_callback() 1364 device_release_driver(drv->trans->dev); iwl_req_fw_callback() 1370 struct iwl_drv *drv; iwl_drv_start() local 1373 drv = kzalloc(sizeof(*drv), GFP_KERNEL); iwl_drv_start() 1374 if (!drv) { iwl_drv_start() 1379 drv->trans = trans; iwl_drv_start() 1380 drv->dev = trans->dev; iwl_drv_start() 1381 drv->cfg = cfg; iwl_drv_start() 1383 init_completion(&drv->request_firmware_complete); iwl_drv_start() 1384 INIT_LIST_HEAD(&drv->list); iwl_drv_start() 1388 drv->dbgfs_drv = debugfs_create_dir(dev_name(trans->dev), iwl_drv_start() 1391 if (!drv->dbgfs_drv) { iwl_drv_start() 1392 IWL_ERR(drv, "failed to create debugfs directory\n"); iwl_drv_start() 1398 drv->trans->dbgfs_dir = debugfs_create_dir("trans", drv->dbgfs_drv); iwl_drv_start() 1400 if (!drv->trans->dbgfs_dir) { iwl_drv_start() 1401 IWL_ERR(drv, "failed to create transport debugfs directory\n"); iwl_drv_start() 1407 ret = iwl_request_firmware(drv, true); iwl_drv_start() 1413 return drv; iwl_drv_start() 1418 debugfs_remove_recursive(drv->dbgfs_drv); iwl_drv_start() 1421 kfree(drv); iwl_drv_start() 1426 void iwl_drv_stop(struct iwl_drv *drv) iwl_drv_stop() argument 1428 wait_for_completion(&drv->request_firmware_complete); iwl_drv_stop() 1430 _iwl_op_mode_stop(drv); iwl_drv_stop() 1432 iwl_dealloc_ucode(drv); iwl_drv_stop() 1440 if (!list_empty(&drv->list)) iwl_drv_stop() 1441 list_del(&drv->list); iwl_drv_stop() 1445 debugfs_remove_recursive(drv->dbgfs_drv); iwl_drv_stop() 1448 kfree(drv); iwl_drv_stop() 1468 struct iwl_drv *drv; iwl_opmode_register() local 1478 list_for_each_entry(drv, &op->drv, list) iwl_opmode_register() 1479 drv->op_mode = _iwl_op_mode_start(drv, op); iwl_opmode_register() 1492 struct iwl_drv *drv; iwl_opmode_deregister() local 1501 list_for_each_entry(drv, &iwlwifi_opmode_table[i].drv, list) iwl_opmode_deregister() 1502 _iwl_op_mode_stop(drv); iwl_opmode_deregister() 1518 INIT_LIST_HEAD(&iwlwifi_opmode_table[i].drv); iwl_drv_init()
|
H A D | Makefile | 4 iwlwifi-objs += iwl-drv.o 9 iwlwifi-objs += pcie/drv.o pcie/rx.o pcie/tx.o pcie/trans.o
|
H A D | iwl-drv.h | 90 * DOC: Driver system flows - drv component 102 * The init flow wrt to the drv component looks like this: 107 * 5) The bus specific component calls to the drv bus agnostic part 118 * iwl_drv_start - start the drv 132 * iwl_drv_stop - stop the drv 134 * @drv: 140 void iwl_drv_stop(struct iwl_drv *drv);
|
/linux-4.1.27/drivers/net/irda/ |
H A D | sir_dongle.c | 35 struct dongle_driver *drv; irda_register_dongle() local 42 drv = list_entry(entry, struct dongle_driver, dongle_list); irda_register_dongle() 43 if (new->type == drv->type) { irda_register_dongle() 54 int irda_unregister_dongle(struct dongle_driver *drv) irda_unregister_dongle() argument 57 list_del(&drv->dongle_list); irda_unregister_dongle() 66 const struct dongle_driver *drv = NULL; sirdev_get_dongle() local 78 drv = list_entry(entry, struct dongle_driver, dongle_list); sirdev_get_dongle() 79 if (drv->type == type) sirdev_get_dongle() 82 drv = NULL; sirdev_get_dongle() 85 if (!drv) { sirdev_get_dongle() 100 if (!try_module_get(drv->owner)) { sirdev_get_dongle() 104 dev->dongle_drv = drv; sirdev_get_dongle() 106 if (!drv->open || (err=drv->open(dev))!=0) sirdev_get_dongle() 114 module_put(drv->owner); sirdev_get_dongle() 122 const struct dongle_driver *drv = dev->dongle_drv; sirdev_put_dongle() local 124 if (drv) { sirdev_put_dongle() 125 if (drv->close) sirdev_put_dongle() 126 drv->close(dev); /* close this dongle instance */ sirdev_put_dongle() 129 module_put(drv->owner);/* decrement driver's module refcount */ sirdev_put_dongle()
|
H A D | sir_dev.c | 49 if (dev->drv->chars_in_buffer) sirdev_tx_complete_fsm() 50 bytes_left = dev->drv->chars_in_buffer(dev); sirdev_tx_complete_fsm() 76 if (dev->drv->wait_until_sent) sirdev_tx_complete_fsm() 77 dev->drv->wait_until_sent(dev); sirdev_tx_complete_fsm() 217 if (dev->drv->set_speed) sirdev_config_fsm() 218 dev->drv->set_speed(dev, dev->speed); sirdev_config_fsm() 241 if (dev->drv->set_speed) sirdev_config_fsm() 242 dev->drv->set_speed(dev, dev->speed); sirdev_config_fsm() 381 ret = dev->drv->do_write(dev, dev->tx_buff.data, dev->tx_buff.len); sirdev_raw_write() 421 if (dev->drv->set_dtr_rts) sirdev_set_dtr_rts() 422 ret = dev->drv->set_dtr_rts(dev, dtr, rts); sirdev_set_dtr_rts() 448 actual = dev->drv->do_write(dev, dev->tx_buff.data, dev->tx_buff.len); sirdev_write_complete() 456 net_err_ratelimited("%s: drv->do_write failed (%d)\n", sirdev_write_complete() 656 actual = dev->drv->do_write(dev, dev->tx_buff.data, dev->tx_buff.len); sirdev_hard_xmit() 665 net_err_ratelimited("%s: drv->do_write failed (%d)\n", sirdev_hard_xmit() 795 const struct sir_driver *drv = dev->drv; sirdev_open() local 797 if (!drv) sirdev_open() 801 if (!try_module_get(drv->owner)) sirdev_open() 807 if (!dev->drv->start_dev || dev->drv->start_dev(dev)) sirdev_open() 826 if (dev->drv->stop_dev) sirdev_open() 827 dev->drv->stop_dev(dev); sirdev_open() 831 module_put(drv->owner); sirdev_open() 838 const struct sir_driver *drv; sirdev_close() local 853 drv = dev->drv; sirdev_close() 854 if (unlikely(!drv || !dev->priv)) sirdev_close() 857 if (drv->stop_dev) sirdev_close() 858 drv->stop_dev(dev); sirdev_close() 861 module_put(drv->owner); sirdev_close() 877 struct sir_dev * sirdev_get_instance(const struct sir_driver *drv, const char *name) sirdev_get_instance() argument 884 /* instead of adding tests to protect against drv->do_write==NULL sirdev_get_instance() 888 if (!drv || !drv->do_write) sirdev_get_instance() 904 dev->qos.min_turn_time.bits = drv->qos_mtt_bits; sirdev_get_instance() 915 dev->drv = drv; sirdev_get_instance()
|
H A D | sir-dev.h | 106 int irda_unregister_dongle(struct dongle_driver *drv); 108 struct sir_dev *sirdev_get_instance(const struct sir_driver *drv, 186 const struct sir_driver * drv; member in struct:sir_dev
|
/linux-4.1.27/drivers/crypto/nx/ |
H A D | nx_debugfs.c | 45 int nx_debugfs_init(struct nx_crypto_driver *drv) nx_debugfs_init() argument 47 struct nx_debugfs *dfs = &drv->dfs; nx_debugfs_init() 54 dfs->dfs_root, (u32 *)&drv->stats.aes_ops); nx_debugfs_init() 59 (u32 *)&drv->stats.sha256_ops); nx_debugfs_init() 64 (u32 *)&drv->stats.sha512_ops); nx_debugfs_init() 69 (u64 *)&drv->stats.aes_bytes); nx_debugfs_init() 74 (u64 *)&drv->stats.sha256_bytes); nx_debugfs_init() 79 (u64 *)&drv->stats.sha512_bytes); nx_debugfs_init() 83 dfs->dfs_root, (u32 *)&drv->stats.errors); nx_debugfs_init() 88 (u32 *)&drv->stats.last_error); nx_debugfs_init() 93 (u32 *)&drv->stats.last_error_pid); nx_debugfs_init() 98 nx_debugfs_fini(struct nx_crypto_driver *drv) nx_debugfs_fini() argument 100 debugfs_remove_recursive(drv->dfs.dfs_root); nx_debugfs_fini()
|
H A D | nx.h | 173 #define NX_DEBUGFS_INIT(drv) nx_debugfs_init(drv) 174 #define NX_DEBUGFS_FINI(drv) nx_debugfs_fini(drv) 179 #define NX_DEBUGFS_INIT(drv) (0) 180 #define NX_DEBUGFS_FINI(drv) (0)
|
/linux-4.1.27/drivers/dio/ |
H A D | dio-driver.c | 50 struct dio_driver *drv = to_dio_driver(dev->driver); dio_device_probe() local 53 if (!d->driver && drv->probe) { dio_device_probe() 56 id = dio_match_device(drv->id_table, d); dio_device_probe() 58 error = drv->probe(d, id); dio_device_probe() 60 d->driver = drv; dio_device_probe() 70 * @drv: the driver structure to register 76 int dio_register_driver(struct dio_driver *drv) dio_register_driver() argument 79 drv->driver.name = drv->name; dio_register_driver() 80 drv->driver.bus = &dio_bus_type; dio_register_driver() 83 return driver_register(&drv->driver); dio_register_driver() 89 * @drv: the driver structure to unregister 97 void dio_unregister_driver(struct dio_driver *drv) dio_unregister_driver() argument 99 driver_unregister(&drv->driver); dio_unregister_driver() 106 * @drv: the &device_driver that points to the array of DIO device id structures to search 113 static int dio_bus_match(struct device *dev, struct device_driver *drv) dio_bus_match() argument 116 struct dio_driver *dio_drv = to_dio_driver(drv); dio_bus_match()
|
/linux-4.1.27/drivers/isdn/pcbit/ |
H A D | Makefile | 9 pcbit-y := module.o edss1.o drv.o layer2.o capi.o callbacks.o
|
/linux-4.1.27/drivers/media/radio/ |
H A D | radio-isa.c | 50 strlcpy(v->driver, isa->drv->driver.driver.name, sizeof(v->driver)); radio_isa_querycap() 51 strlcpy(v->card, isa->drv->card, sizeof(v->card)); radio_isa_querycap() 63 const struct radio_isa_ops *ops = isa->drv->ops; radio_isa_g_tuner() 73 if (isa->drv->has_stereo) radio_isa_g_tuner() 93 const struct radio_isa_ops *ops = isa->drv->ops; radio_isa_s_tuner() 114 res = isa->drv->ops->s_frequency(isa, freq); radio_isa_s_frequency() 139 return isa->drv->ops->s_mute_volume(isa, ctrl->val, radio_isa_s_ctrl() 179 struct radio_isa_driver *drv = pdev->platform_data; radio_isa_match() local 181 return drv->probe || drv->io_params[dev] >= 0; radio_isa_match() 185 static bool radio_isa_valid_io(const struct radio_isa_driver *drv, int io) radio_isa_valid_io() argument 189 for (i = 0; i < drv->num_of_io_ports; i++) radio_isa_valid_io() 190 if (drv->io_ports[i] == io) radio_isa_valid_io() 195 static struct radio_isa_card *radio_isa_alloc(struct radio_isa_driver *drv, radio_isa_alloc() argument 199 struct radio_isa_card *isa = drv->ops->alloc(); radio_isa_alloc() 204 isa->drv = drv; radio_isa_alloc() 215 const struct radio_isa_driver *drv = isa->drv; radio_isa_common_probe() local 216 const struct radio_isa_ops *ops = drv->ops; radio_isa_common_probe() 235 if (drv->max_volume) radio_isa_common_probe() 237 V4L2_CID_AUDIO_VOLUME, 0, drv->max_volume, 1, radio_isa_common_probe() 238 drv->max_volume); radio_isa_common_probe() 245 if (drv->max_volume) radio_isa_common_probe() 258 isa->stereo = drv->has_stereo; radio_isa_common_probe() 280 drv->card, isa->io); radio_isa_common_probe() 294 const struct radio_isa_ops *ops = isa->drv->ops; radio_isa_common_remove() 301 v4l2_info(&isa->v4l2_dev, "Removed radio card %s\n", isa->drv->card); radio_isa_common_remove() 308 struct radio_isa_driver *drv = pdev->platform_data; radio_isa_probe() local 309 const struct radio_isa_ops *ops = drv->ops; radio_isa_probe() 313 isa = radio_isa_alloc(drv, pdev); radio_isa_probe() 316 isa->io = drv->io_params[dev]; radio_isa_probe() 319 if (drv->probe && ops->probe) { radio_isa_probe() 322 for (i = 0; i < drv->num_of_io_ports; ++i) { radio_isa_probe() 323 int io = drv->io_ports[i]; radio_isa_probe() 325 if (request_region(io, drv->region_size, v4l2_dev->name)) { radio_isa_probe() 328 release_region(io, drv->region_size); radio_isa_probe() 337 if (!radio_isa_valid_io(drv, isa->io)) { radio_isa_probe() 343 drv->io_ports[0]); radio_isa_probe() 344 for (i = 1; i < drv->num_of_io_ports; i++) radio_isa_probe() 345 printk(KERN_CONT "/0x%03x", drv->io_ports[i]); radio_isa_probe() 351 return radio_isa_common_probe(isa, pdev, drv->radio_nr_params[dev], radio_isa_probe() 352 drv->region_size); radio_isa_probe() 360 return radio_isa_common_remove(isa, isa->drv->region_size); radio_isa_remove() 368 struct radio_isa_driver *drv = container_of(pnp_drv, radio_isa_pnp_probe() local 375 isa = radio_isa_alloc(drv, &dev->dev); radio_isa_pnp_probe() 381 return radio_isa_common_probe(isa, &dev->dev, drv->radio_nr_params[0], radio_isa_pnp_probe()
|
/linux-4.1.27/sound/aoa/soundbus/ |
H A D | core.c | 40 struct soundbus_driver *drv; soundbus_probe() local 43 drv = to_soundbus_driver(dev->driver); soundbus_probe() 46 if (!drv->probe) soundbus_probe() 51 error = drv->probe(soundbus_dev); soundbus_probe() 111 struct soundbus_driver * drv = to_soundbus_driver(dev->driver); soundbus_device_remove() local 113 if (dev->driver && drv->remove) soundbus_device_remove() 114 drv->remove(soundbus_dev); soundbus_device_remove() 123 struct soundbus_driver * drv = to_soundbus_driver(dev->driver); soundbus_device_shutdown() local 125 if (dev->driver && drv->shutdown) soundbus_device_shutdown() 126 drv->shutdown(soundbus_dev); soundbus_device_shutdown() 134 struct soundbus_driver * drv = to_soundbus_driver(dev->driver); soundbus_device_suspend() local 136 if (dev->driver && drv->suspend) soundbus_device_suspend() 137 return drv->suspend(soundbus_dev, state); soundbus_device_suspend() 144 struct soundbus_driver * drv = to_soundbus_driver(dev->driver); soundbus_device_resume() local 146 if (dev->driver && drv->resume) soundbus_device_resume() 147 return drv->resume(soundbus_dev); soundbus_device_resume() 191 int soundbus_register_driver(struct soundbus_driver *drv) soundbus_register_driver() argument 194 drv->driver.name = drv->name; soundbus_register_driver() 195 drv->driver.bus = &soundbus_bus_type; soundbus_register_driver() 198 return driver_register(&drv->driver); soundbus_register_driver() 202 void soundbus_unregister_driver(struct soundbus_driver *drv) soundbus_unregister_driver() argument 204 driver_unregister(&drv->driver); soundbus_unregister_driver()
|
/linux-4.1.27/drivers/mtd/chips/ |
H A D | chipreg.c | 17 void register_mtd_chip_driver(struct mtd_chip_driver *drv) register_mtd_chip_driver() argument 20 list_add(&drv->list, &chip_drvs_list); register_mtd_chip_driver() 24 void unregister_mtd_chip_driver(struct mtd_chip_driver *drv) unregister_mtd_chip_driver() argument 27 list_del(&drv->list); unregister_mtd_chip_driver() 59 struct mtd_chip_driver *drv; do_map_probe() local 62 drv = get_mtd_chip_driver(name); do_map_probe() 64 if (!drv && !request_module("%s", name)) do_map_probe() 65 drv = get_mtd_chip_driver(name); do_map_probe() 67 if (!drv) do_map_probe() 70 ret = drv->probe(map); do_map_probe() 77 module_put(drv->module); do_map_probe()
|
/linux-4.1.27/drivers/video/fbdev/via/ |
H A D | via_aux_edid.c | 33 static void query_edid(struct via_aux_drv *drv) query_edid() argument 35 struct fb_monspecs *spec = drv->data; query_edid() 48 if (via_aux_read(drv, 0x00, edid, EDID_LENGTH)) { query_edid() 59 drv->data = spec; query_edid() 62 static const struct fb_videomode *get_preferred_mode(struct via_aux_drv *drv) get_preferred_mode() argument 64 struct fb_monspecs *spec = drv->data; get_preferred_mode() 79 static void cleanup(struct via_aux_drv *drv) cleanup() argument 81 struct fb_monspecs *spec = drv->data; cleanup() 89 struct via_aux_drv drv = { via_aux_edid_probe() local 96 query_edid(&drv); via_aux_edid_probe() 99 via_aux_add(&drv); via_aux_edid_probe()
|
H A D | via_aux_vt1621.c | 33 struct via_aux_drv drv = { via_aux_vt1621_probe() local 39 if (!via_aux_read(&drv, 0x1B, &tmp, 1) || tmp != 0x02) via_aux_vt1621_probe() 43 via_aux_add(&drv); via_aux_vt1621_probe()
|
H A D | via_aux.h | 47 void (*cleanup)(struct via_aux_drv *drv); 49 (struct via_aux_drv *drv); 58 static inline bool via_aux_add(struct via_aux_drv *drv) via_aux_add() argument 65 *data = *drv; via_aux_add() 70 static inline bool via_aux_read(struct via_aux_drv *drv, u8 start, u8 *buf, via_aux_read() argument 74 {.addr = drv->addr, .flags = 0, .len = 1, .buf = &start}, via_aux_read() 75 {.addr = drv->addr, .flags = I2C_M_RD, .len = len, .buf = buf} }; via_aux_read() 77 return i2c_transfer(drv->bus->adap, msg, 2) == 2; via_aux_read()
|
H A D | via_aux_ch7301.c | 33 struct via_aux_drv drv = { probe() local 39 if (!via_aux_read(&drv, 0x4B, &tmp, 1) || tmp != 0x17) probe() 43 via_aux_add(&drv); probe()
|
H A D | via_aux_sii164.c | 33 struct via_aux_drv drv = { probe() local 41 if (!via_aux_read(&drv, 0x00, tmp, len) || memcmp(id, tmp, len)) probe() 45 via_aux_add(&drv); probe()
|
H A D | via_aux_vt1622.c | 33 struct via_aux_drv drv = { probe() local 39 if (!via_aux_read(&drv, 0x1B, &tmp, 1) || tmp != 0x03) probe() 43 via_aux_add(&drv); probe()
|
H A D | via_aux_vt1625.c | 33 struct via_aux_drv drv = { probe() local 39 if (!via_aux_read(&drv, 0x1B, &tmp, 1) || tmp != 0x50) probe() 43 via_aux_add(&drv); probe()
|
H A D | via_aux_vt1631.c | 33 struct via_aux_drv drv = { via_aux_vt1631_probe() local 41 if (!via_aux_read(&drv, 0x00, tmp, len) || memcmp(id, tmp, len)) via_aux_vt1631_probe() 45 via_aux_add(&drv); via_aux_vt1631_probe()
|
H A D | via_aux_vt1632.c | 33 struct via_aux_drv drv = { probe() local 41 if (!via_aux_read(&drv, 0x00, tmp, len) || memcmp(id, tmp, len)) probe() 45 via_aux_add(&drv); probe()
|
H A D | via_aux_vt1636.c | 33 struct via_aux_drv drv = { via_aux_vt1636_probe() local 41 if (!via_aux_read(&drv, 0x00, tmp, len) || memcmp(id, tmp, len)) via_aux_vt1636_probe() 45 via_aux_add(&drv); via_aux_vt1636_probe()
|
/linux-4.1.27/drivers/zorro/ |
H A D | zorro-driver.c | 46 struct zorro_driver *drv = to_zorro_driver(dev->driver); zorro_device_probe() local 49 if (!z->driver && drv->probe) { zorro_device_probe() 52 id = zorro_match_device(drv->id_table, z); zorro_device_probe() 54 error = drv->probe(z, id); zorro_device_probe() 56 z->driver = drv; zorro_device_probe() 67 struct zorro_driver *drv = to_zorro_driver(dev->driver); zorro_device_remove() local 69 if (drv) { zorro_device_remove() 70 if (drv->remove) zorro_device_remove() 71 drv->remove(z); zorro_device_remove() 80 * @drv: the driver structure to register 86 int zorro_register_driver(struct zorro_driver *drv) zorro_register_driver() argument 89 drv->driver.name = drv->name; zorro_register_driver() 90 drv->driver.bus = &zorro_bus_type; zorro_register_driver() 93 return driver_register(&drv->driver); zorro_register_driver() 100 * @drv: the driver structure to unregister 108 void zorro_unregister_driver(struct zorro_driver *drv) zorro_unregister_driver() argument 110 driver_unregister(&drv->driver); zorro_unregister_driver() 126 static int zorro_bus_match(struct device *dev, struct device_driver *drv) zorro_bus_match() argument 129 struct zorro_driver *zorro_drv = to_zorro_driver(drv); zorro_bus_match()
|
/linux-4.1.27/drivers/pnp/ |
H A D | card.c | 18 static const struct pnp_card_device_id *match_card(struct pnp_card_driver *drv, match_card() argument 21 const struct pnp_card_device_id *drv_id = drv->id_table; match_card() 59 struct pnp_card_driver *drv = to_pnp_card_driver(dev->driver); card_remove_first() local 61 if (!dev->card || !drv) card_remove_first() 63 if (drv->remove) card_remove_first() 64 drv->remove(dev->card_link); card_remove_first() 65 drv->link.remove = &card_remove; card_remove_first() 70 static int card_probe(struct pnp_card *card, struct pnp_card_driver *drv) card_probe() argument 76 if (!drv->probe) card_probe() 78 id = match_card(drv, card); card_probe() 86 clink->driver = drv; card_probe() 89 if (drv->probe(clink, id) >= 0) card_probe() 263 struct pnp_card_driver *drv = pnp_add_card() local 266 card_probe(card, drv); pnp_add_card() 332 struct pnp_card_driver *drv; pnp_request_card_device() local 339 drv = clink->driver; pnp_request_card_device() 358 dev->dev.driver = &drv->link.driver; pnp_request_card_device() 378 struct pnp_card_driver *drv = dev->card_link->driver; pnp_release_card_device() local 380 drv->link.remove = &card_remove; pnp_release_card_device() 382 drv->link.remove = &card_remove_first; pnp_release_card_device() 411 * @drv: pointer to the driver to register 413 int pnp_register_card_driver(struct pnp_card_driver *drv) pnp_register_card_driver() argument 418 drv->link.name = drv->name; pnp_register_card_driver() 419 drv->link.id_table = NULL; /* this will disable auto matching */ pnp_register_card_driver() 420 drv->link.flags = drv->flags; pnp_register_card_driver() 421 drv->link.probe = NULL; pnp_register_card_driver() 422 drv->link.remove = &card_remove_first; pnp_register_card_driver() 423 drv->link.suspend = drv->suspend ? card_suspend : NULL; pnp_register_card_driver() 424 drv->link.resume = drv->resume ? card_resume : NULL; pnp_register_card_driver() 426 error = pnp_register_driver(&drv->link); pnp_register_card_driver() 431 list_add_tail(&drv->global_list, &pnp_card_drivers); pnp_register_card_driver() 437 card_probe(card, drv); pnp_register_card_driver() 444 * @drv: pointer to the driver to unregister 446 void pnp_unregister_card_driver(struct pnp_card_driver *drv) pnp_unregister_card_driver() argument 449 list_del(&drv->global_list); pnp_unregister_card_driver() 451 pnp_unregister_driver(&drv->link); pnp_unregister_card_driver()
|
H A D | driver.c | 43 static const struct pnp_device_id *match_device(struct pnp_driver *drv, match_device() argument 46 const struct pnp_device_id *drv_id = drv->id_table; match_device() 127 struct pnp_driver *drv = pnp_dev->driver; pnp_device_remove() local 129 if (drv) { pnp_device_remove() 130 if (drv->remove) pnp_device_remove() 131 drv->remove(pnp_dev); pnp_device_remove() 141 struct pnp_driver *drv = pnp_dev->driver; pnp_device_shutdown() local 143 if (drv && drv->shutdown) pnp_device_shutdown() 144 drv->shutdown(pnp_dev); pnp_device_shutdown() 147 static int pnp_bus_match(struct device *dev, struct device_driver *drv) pnp_bus_match() argument 150 struct pnp_driver *pnp_drv = to_pnp_driver(drv); pnp_bus_match() 262 int pnp_register_driver(struct pnp_driver *drv) pnp_register_driver() argument 264 drv->driver.name = drv->name; pnp_register_driver() 265 drv->driver.bus = &pnp_bus_type; pnp_register_driver() 267 return driver_register(&drv->driver); pnp_register_driver() 270 void pnp_unregister_driver(struct pnp_driver *drv) pnp_unregister_driver() argument 272 driver_unregister(&drv->driver); pnp_unregister_driver()
|
/linux-4.1.27/drivers/pci/ |
H A D | pci-driver.c | 32 * @drv: target pci driver 42 * driver to probe for all devices again. @drv must have been 51 int pci_add_dynid(struct pci_driver *drv, pci_add_dynid() argument 71 spin_lock(&drv->dynids.lock); pci_add_dynid() 72 list_add_tail(&dynid->node, &drv->dynids.list); pci_add_dynid() 73 spin_unlock(&drv->dynids.lock); pci_add_dynid() 75 return driver_attach(&drv->driver); pci_add_dynid() 79 static void pci_free_dynids(struct pci_driver *drv) pci_free_dynids() argument 83 spin_lock(&drv->dynids.lock); pci_free_dynids() 84 list_for_each_entry_safe(dynid, n, &drv->dynids.list, node) { pci_free_dynids() 88 spin_unlock(&drv->dynids.lock); pci_free_dynids() 247 * @drv: the PCI driver to match against 254 static const struct pci_device_id *pci_match_device(struct pci_driver *drv, pci_match_device() argument 261 if (dev->driver_override && strcmp(dev->driver_override, drv->name)) pci_match_device() 265 spin_lock(&drv->dynids.lock); pci_match_device() 266 list_for_each_entry(dynid, &drv->dynids.list, node) { pci_match_device() 272 spin_unlock(&drv->dynids.lock); pci_match_device() 275 found_id = pci_match_id(drv->id_table, dev); pci_match_device() 285 struct pci_driver *drv; member in struct:drv_dev_and_id 294 struct pci_driver *pci_drv = ddi->drv; local_pci_probe() 324 static int pci_call_probe(struct pci_driver *drv, struct pci_dev *dev, pci_call_probe() argument 328 struct drv_dev_and_id ddi = { drv, dev, id }; pci_call_probe() 368 * @drv: driver to call to check if it wants the PCI device 372 * side-effect: pci_dev->driver is set to drv when drv claims pci_dev. 374 static int __pci_device_probe(struct pci_driver *drv, struct pci_dev *pci_dev) __pci_device_probe() argument 379 if (!pci_dev->driver && drv->probe) { __pci_device_probe() 382 id = pci_match_device(drv, pci_dev); __pci_device_probe() 384 error = pci_call_probe(drv, pci_dev, id); __pci_device_probe() 394 struct pci_driver *drv; pci_device_probe() local 397 drv = to_pci_driver(dev->driver); pci_device_probe() 400 error = __pci_device_probe(drv, pci_dev); pci_device_probe() 410 struct pci_driver *drv = pci_dev->driver; pci_device_remove() local 412 if (drv) { pci_device_remove() 413 if (drv->remove) { pci_device_remove() 415 drv->remove(pci_dev); pci_device_remove() 447 struct pci_driver *drv = pci_dev->driver; pci_device_shutdown() local 451 if (drv && drv->shutdown) pci_device_shutdown() 452 drv->shutdown(pci_dev); pci_device_shutdown() 539 struct pci_driver *drv = pci_dev->driver; pci_legacy_suspend() local 541 if (drv && drv->suspend) { pci_legacy_suspend() 545 error = drv->suspend(pci_dev, state); pci_legacy_suspend() 546 suspend_report_result(drv->suspend, error); pci_legacy_suspend() 554 drv->suspend); pci_legacy_suspend() 566 struct pci_driver *drv = pci_dev->driver; pci_legacy_suspend_late() local 568 if (drv && drv->suspend_late) { pci_legacy_suspend_late() 572 error = drv->suspend_late(pci_dev, state); pci_legacy_suspend_late() 573 suspend_report_result(drv->suspend_late, error); pci_legacy_suspend_late() 581 drv->suspend_late); pci_legacy_suspend_late() 600 struct pci_driver *drv = pci_dev->driver; pci_legacy_resume_early() local 602 return drv && drv->resume_early ? pci_legacy_resume_early() 603 drv->resume_early(pci_dev) : 0; pci_legacy_resume_early() 609 struct pci_driver *drv = pci_dev->driver; pci_legacy_resume() local 613 return drv && drv->resume ? pci_legacy_resume() 614 drv->resume(pci_dev) : pci_pm_reenable_device(pci_dev); pci_legacy_resume() 636 struct pci_driver *drv = pci_dev->driver; pci_has_legacy_pm_support() local 637 bool ret = drv && (drv->suspend || drv->suspend_late || drv->resume pci_has_legacy_pm_support() 638 || drv->resume_early); pci_has_legacy_pm_support() 645 WARN(ret && drv->driver.pm, "driver %s device %04x:%04x\n", pci_has_legacy_pm_support() 646 drv->name, pci_dev->vendor, pci_dev->device); pci_has_legacy_pm_support() 655 struct device_driver *drv = dev->driver; pci_pm_prepare() local 664 if (drv && drv->pm && drv->pm->prepare) { pci_pm_prepare() 665 int error = drv->pm->prepare(dev); pci_pm_prepare() 788 struct device_driver *drv = dev->driver; pci_pm_resume_noirq() local 796 if (drv && drv->pm && drv->pm->resume_noirq) pci_pm_resume_noirq() 797 error = drv->pm->resume_noirq(dev); pci_pm_resume_noirq() 888 struct device_driver *drv = dev->driver; pci_pm_freeze_noirq() local 893 if (drv && drv->pm && drv->pm->freeze_noirq) { pci_pm_freeze_noirq() 896 error = drv->pm->freeze_noirq(dev); pci_pm_freeze_noirq() 897 suspend_report_result(drv->pm->freeze_noirq, error); pci_pm_freeze_noirq() 916 struct device_driver *drv = dev->driver; pci_pm_thaw_noirq() local 930 if (drv && drv->pm && drv->pm->thaw_noirq) pci_pm_thaw_noirq() 931 error = drv->pm->thaw_noirq(dev); pci_pm_thaw_noirq() 1001 struct device_driver *drv = dev->driver; pci_pm_poweroff_noirq() local 1006 if (!drv || !drv->pm) { pci_pm_poweroff_noirq() 1011 if (drv->pm->poweroff_noirq) { pci_pm_poweroff_noirq() 1014 error = drv->pm->poweroff_noirq(dev); pci_pm_poweroff_noirq() 1015 suspend_report_result(drv->pm->poweroff_noirq, error); pci_pm_poweroff_noirq() 1041 struct device_driver *drv = dev->driver; pci_pm_restore_noirq() local 1055 if (drv && drv->pm && drv->pm->restore_noirq) pci_pm_restore_noirq() 1056 error = drv->pm->restore_noirq(dev); pci_pm_restore_noirq() 1237 * @drv: the driver structure to register 1238 * @owner: owner module of drv 1246 int __pci_register_driver(struct pci_driver *drv, struct module *owner, __pci_register_driver() argument 1250 drv->driver.name = drv->name; __pci_register_driver() 1251 drv->driver.bus = &pci_bus_type; __pci_register_driver() 1252 drv->driver.owner = owner; __pci_register_driver() 1253 drv->driver.mod_name = mod_name; __pci_register_driver() 1255 spin_lock_init(&drv->dynids.lock); __pci_register_driver() 1256 INIT_LIST_HEAD(&drv->dynids.list); __pci_register_driver() 1259 return driver_register(&drv->driver); __pci_register_driver() 1265 * @drv: the driver structure to unregister 1273 void pci_unregister_driver(struct pci_driver *drv) pci_unregister_driver() argument 1275 driver_unregister(&drv->driver); pci_unregister_driver() 1276 pci_free_dynids(drv); pci_unregister_driver() 1308 * @drv: the device driver to search for matching PCI device id structures 1314 static int pci_bus_match(struct device *dev, struct device_driver *drv) pci_bus_match() argument 1323 pci_drv = to_pci_driver(drv); pci_bus_match()
|
/linux-4.1.27/drivers/net/ethernet/amd/xgbe/ |
H A D | Makefile | 3 amd-xgbe-objs := xgbe-main.o xgbe-drv.o xgbe-dev.o \
|
/linux-4.1.27/drivers/sh/superhyway/ |
H A D | superhyway.c | 168 * @drv: SuperHyway driver to register. 170 * This registers the passed in @drv. Any devices matching the id table will 174 int superhyway_register_driver(struct superhyway_driver *drv) superhyway_register_driver() argument 176 drv->drv.name = drv->name; superhyway_register_driver() 177 drv->drv.bus = &superhyway_bus_type; superhyway_register_driver() 179 return driver_register(&drv->drv); superhyway_register_driver() 184 * @drv: SuperHyway driver to unregister. 189 void superhyway_unregister_driver(struct superhyway_driver *drv) superhyway_unregister_driver() argument 191 driver_unregister(&drv->drv); superhyway_unregister_driver() 194 static int superhyway_bus_match(struct device *dev, struct device_driver *drv) superhyway_bus_match() argument 197 struct superhyway_driver *shyway_drv = to_superhyway_driver(drv); superhyway_bus_match()
|
/linux-4.1.27/drivers/pci/pcie/ |
H A D | portdrv_bus.c | 18 static int pcie_port_bus_match(struct device *dev, struct device_driver *drv); 26 static int pcie_port_bus_match(struct device *dev, struct device_driver *drv) pcie_port_bus_match() argument 31 if (drv->bus != &pcie_port_bus_type || dev->bus != &pcie_port_bus_type) pcie_port_bus_match() 35 driver = to_service_driver(drv); pcie_port_bus_match()
|
/linux-4.1.27/drivers/mmc/core/ |
H A D | sdio_bus.c | 31 #define to_sdio_driver(d) container_of(d, struct sdio_driver, drv) 97 static int sdio_bus_match(struct device *dev, struct device_driver *drv) sdio_bus_match() argument 100 struct sdio_driver *sdrv = to_sdio_driver(drv); sdio_bus_match() 131 struct sdio_driver *drv = to_sdio_driver(dev->driver); sdio_bus_probe() local 136 id = sdio_match_device(func, drv); sdio_bus_probe() 160 ret = drv->probe(func, id); sdio_bus_probe() 174 struct sdio_driver *drv = to_sdio_driver(dev->driver); sdio_bus_remove() local 182 drv->remove(func); sdio_bus_remove() 186 drv->name); sdio_bus_remove() 234 * @drv: SDIO function driver 236 int sdio_register_driver(struct sdio_driver *drv) sdio_register_driver() argument 238 drv->drv.name = drv->name; sdio_register_driver() 239 drv->drv.bus = &sdio_bus_type; sdio_register_driver() 240 return driver_register(&drv->drv); sdio_register_driver() 246 * @drv: SDIO function driver 248 void sdio_unregister_driver(struct sdio_driver *drv) sdio_unregister_driver() argument 250 drv->drv.bus = &sdio_bus_type; sdio_unregister_driver() 251 driver_unregister(&drv->drv); sdio_unregister_driver()
|
H A D | bus.c | 29 #define to_mmc_driver(d) container_of(d, struct mmc_driver, drv) 62 static int mmc_bus_match(struct device *dev, struct device_driver *drv) mmc_bus_match() argument 112 struct mmc_driver *drv = to_mmc_driver(dev->driver); mmc_bus_probe() local 115 return drv->probe(card); mmc_bus_probe() 120 struct mmc_driver *drv = to_mmc_driver(dev->driver); mmc_bus_remove() local 123 drv->remove(card); mmc_bus_remove() 130 struct mmc_driver *drv = to_mmc_driver(dev->driver); mmc_bus_shutdown() local 135 if (dev->driver && drv->shutdown) mmc_bus_shutdown() 136 drv->shutdown(card); mmc_bus_shutdown() 223 * @drv: MMC media driver 225 int mmc_register_driver(struct mmc_driver *drv) mmc_register_driver() argument 227 drv->drv.bus = &mmc_bus_type; mmc_register_driver() 228 return driver_register(&drv->drv); mmc_register_driver() 235 * @drv: MMC media driver 237 void mmc_unregister_driver(struct mmc_driver *drv) mmc_unregister_driver() argument 239 drv->drv.bus = &mmc_bus_type; mmc_unregister_driver() 240 driver_unregister(&drv->drv); mmc_unregister_driver()
|
/linux-4.1.27/include/linux/ |
H A D | cpuidle.h | 49 struct cpuidle_driver *drv, 60 struct cpuidle_driver *drv, 128 extern bool cpuidle_not_available(struct cpuidle_driver *drv, 131 extern int cpuidle_select(struct cpuidle_driver *drv, 133 extern int cpuidle_enter(struct cpuidle_driver *drv, 137 extern int cpuidle_register_driver(struct cpuidle_driver *drv); 141 extern void cpuidle_unregister_driver(struct cpuidle_driver *drv); 144 extern int cpuidle_register(struct cpuidle_driver *drv, 146 extern void cpuidle_unregister(struct cpuidle_driver *drv); 154 extern int cpuidle_find_deepest_state(struct cpuidle_driver *drv, 156 extern int cpuidle_enter_freeze(struct cpuidle_driver *drv, 162 static inline bool cpuidle_not_available(struct cpuidle_driver *drv, cpuidle_not_available() argument 165 static inline int cpuidle_select(struct cpuidle_driver *drv, cpuidle_select() argument 168 static inline int cpuidle_enter(struct cpuidle_driver *drv, cpuidle_enter() argument 172 static inline int cpuidle_register_driver(struct cpuidle_driver *drv) cpuidle_register_driver() argument 177 static inline void cpuidle_unregister_driver(struct cpuidle_driver *drv) { } cpuidle_register_device() argument 181 static inline int cpuidle_register(struct cpuidle_driver *drv, cpuidle_register() argument 184 static inline void cpuidle_unregister(struct cpuidle_driver *drv) { } cpuidle_pause_and_lock() argument 193 static inline int cpuidle_find_deepest_state(struct cpuidle_driver *drv, cpuidle_find_deepest_state() argument 196 static inline int cpuidle_enter_freeze(struct cpuidle_driver *drv, cpuidle_enter_freeze() argument 220 int (*enable) (struct cpuidle_driver *drv, 222 void (*disable) (struct cpuidle_driver *drv, 225 int (*select) (struct cpuidle_driver *drv,
|
H A D | serio.h | 45 struct serio_driver *drv; /* accessed from interrupt, must be protected by serio->lock and serio->sem */ member in struct:serio 46 struct mutex drv_mutex; /* protects serio->drv so attributes can pin driver */ 62 int (*connect)(struct serio *, struct serio_driver *drv); 71 int serio_open(struct serio *serio, struct serio_driver *drv); 86 int __must_check __serio_register_driver(struct serio_driver *drv, 90 #define serio_register_driver(drv) \ 91 __serio_register_driver(drv, THIS_MODULE, KBUILD_MODNAME) 93 void serio_unregister_driver(struct serio_driver *drv); 118 if (serio->drv && serio->drv->write_wakeup) serio_drv_write_wakeup() 119 serio->drv->write_wakeup(serio); serio_drv_write_wakeup()
|
H A D | gameport.h | 45 struct gameport_driver *drv; member in struct:gameport 46 struct mutex drv_mutex; /* protects serio->drv so attributes can pin driver */ 57 int (*connect)(struct gameport *, struct gameport_driver *drv); 67 int gameport_open(struct gameport *gameport, struct gameport_driver *drv, int mode); 146 int __must_check __gameport_register_driver(struct gameport_driver *drv, 150 #define gameport_register_driver(drv) \ 151 __gameport_register_driver(drv, THIS_MODULE, KBUILD_MODNAME) 153 void gameport_unregister_driver(struct gameport_driver *drv);
|
H A D | of_device.h | 20 * @drv: the device_driver structure to test 24 const struct device_driver *drv) of_driver_match_device() 26 return of_match_device(drv->of_match_table, dev) != NULL; of_driver_match_device() 60 struct device_driver *drv) of_driver_match_device() 23 of_driver_match_device(struct device *dev, const struct device_driver *drv) of_driver_match_device() argument 59 of_driver_match_device(struct device *dev, struct device_driver *drv) of_driver_match_device() argument
|
H A D | superhyway.h | 54 struct device_driver drv; member in struct:superhyway_driver 60 #define to_superhyway_driver(d) container_of((d), struct superhyway_driver, drv) 68 struct superhyway_driver *drv; member in struct:superhyway_device
|
H A D | olpc-ec.h | 30 extern void olpc_ec_driver_register(struct olpc_ec_driver *drv, void *arg);
|
H A D | mic_bus.h | 97 int mbus_register_driver(struct mbus_driver *drv); 98 void mbus_unregister_driver(struct mbus_driver *drv); 105 static inline struct mbus_driver *drv_to_mbus(struct device_driver *drv) drv_to_mbus() argument 107 return container_of(drv, struct mbus_driver, driver); drv_to_mbus()
|
H A D | maple.h | 85 struct device_driver drv; member in struct:maple_driver 100 #define to_maple_driver(n) container_of(n, struct maple_driver, drv)
|
H A D | pnp.h | 390 #define to_pnp_driver(drv) container_of(drv, struct pnp_driver, driver) 405 #define to_pnp_card_driver(drv) container_of(drv, struct pnp_card_driver, link) 460 int pnp_register_card_driver(struct pnp_card_driver *drv); 461 void pnp_unregister_card_driver(struct pnp_card_driver *drv); 477 int pnp_register_driver(struct pnp_driver *drv); 478 void pnp_unregister_driver(struct pnp_driver *drv); 491 static inline int pnp_register_card_driver(struct pnp_card_driver *drv) { return -ENODEV; } pnp_unregister_card_driver() argument 492 static inline void pnp_unregister_card_driver(struct pnp_card_driver *drv) { } pnp_unregister_card_driver() argument 508 static inline int pnp_register_driver(struct pnp_driver *drv) { return -ENODEV; } pnp_unregister_driver() argument 509 static inline void pnp_unregister_driver(struct pnp_driver *drv) { } argument
|
H A D | eisa.h | 62 #define to_eisa_driver(drv) container_of(drv,struct eisa_driver, driver)
|
H A D | platform_device.h | 185 #define to_platform_driver(drv) (container_of((drv), struct platform_driver, \ 191 #define platform_driver_register(drv) \ 192 __platform_driver_register(drv, THIS_MODULE) 200 #define platform_driver_probe(drv, probe) \ 201 __platform_driver_probe(drv, probe, THIS_MODULE)
|
H A D | tc.h | 110 #define to_tc_driver(drv) container_of(drv, struct tc_driver, driver)
|
H A D | tifm.h | 144 int tifm_register_driver(struct tifm_driver *drv); 145 void tifm_unregister_driver(struct tifm_driver *drv);
|
H A D | vlynq.h | 90 static inline struct vlynq_driver *to_vlynq_driver(struct device_driver *drv) to_vlynq_driver() argument 92 return container_of(drv, struct vlynq_driver, driver); to_vlynq_driver()
|
H A D | zorro.h | 63 #define to_zorro_driver(drv) container_of(drv, struct zorro_driver, driver)
|
/linux-4.1.27/drivers/media/rc/ |
H A D | ir-lirc-codec.c | 41 if (!dev->raw->lirc.drv || !dev->raw->lirc.drv->rbuf) ir_lirc_decode() 90 lirc_buffer_write(dev->raw->lirc.drv->rbuf, ir_lirc_decode() 101 lirc_buffer_write(dev->raw->lirc.drv->rbuf, ir_lirc_decode() 103 wake_up(&dev->raw->lirc.drv->rbuf->wait_poll); ir_lirc_decode() 341 struct lirc_driver *drv; ir_lirc_register() local 346 drv = kzalloc(sizeof(struct lirc_driver), GFP_KERNEL); ir_lirc_register() 347 if (!drv) ir_lirc_register() 382 snprintf(drv->name, sizeof(drv->name), "ir-lirc-codec (%s)", ir_lirc_register() 384 drv->minor = -1; ir_lirc_register() 385 drv->features = features; ir_lirc_register() 386 drv->data = &dev->raw->lirc; ir_lirc_register() 387 drv->rbuf = rbuf; ir_lirc_register() 388 drv->set_use_inc = &ir_lirc_open; ir_lirc_register() 389 drv->set_use_dec = &ir_lirc_close; ir_lirc_register() 390 drv->code_length = sizeof(struct ir_raw_event) * 8; ir_lirc_register() 391 drv->fops = &lirc_fops; ir_lirc_register() 392 drv->dev = &dev->dev; ir_lirc_register() 393 drv->rdev = dev; ir_lirc_register() 394 drv->owner = THIS_MODULE; ir_lirc_register() 396 drv->minor = lirc_register_driver(drv); ir_lirc_register() 397 if (drv->minor < 0) { ir_lirc_register() 402 dev->raw->lirc.drv = drv; ir_lirc_register() 410 kfree(drv); ir_lirc_register() 419 lirc_unregister_driver(lirc->drv->minor); ir_lirc_unregister() 420 lirc_buffer_free(lirc->drv->rbuf); ir_lirc_unregister() 421 kfree(lirc->drv); ir_lirc_unregister()
|
/linux-4.1.27/drivers/input/serio/ |
H A D | serio.c | 58 static void serio_attach_driver(struct serio_driver *drv); 60 static int serio_connect_driver(struct serio *serio, struct serio_driver *drv) serio_connect_driver() argument 65 retval = drv->connect(serio, drv); serio_connect_driver() 76 if (serio->drv && serio->drv->reconnect) serio_reconnect_driver() 77 retval = serio->drv->reconnect(serio); serio_reconnect_driver() 86 if (serio->drv) serio_disconnect_driver() 87 serio->drv->disconnect(serio); serio_disconnect_driver() 108 static int serio_bind_driver(struct serio *serio, struct serio_driver *drv) serio_bind_driver() argument 112 if (serio_match_port(drv->id_table, serio)) { serio_bind_driver() 114 serio->dev.driver = &drv->driver; serio_bind_driver() 115 if (serio_connect_driver(serio, drv)) { serio_bind_driver() 125 drv->description, error); serio_bind_driver() 403 struct device_driver *drv; drvctl_store() local 418 } else if ((drv = driver_find(buf, &serio_bus)) != NULL) { drvctl_store() 420 error = serio_bind_driver(serio, to_serio_driver(drv)); drvctl_store() 753 static ssize_t description_show(struct device_driver *drv, char *buf) description_show() argument 755 struct serio_driver *driver = to_serio_driver(drv); description_show() 760 static ssize_t bind_mode_show(struct device_driver *drv, char *buf) bind_mode_show() argument 762 struct serio_driver *serio_drv = to_serio_driver(drv); bind_mode_show() 766 static ssize_t bind_mode_store(struct device_driver *drv, const char *buf, size_t count) bind_mode_store() argument 768 struct serio_driver *serio_drv = to_serio_driver(drv); bind_mode_store() 794 struct serio_driver *drv = to_serio_driver(dev->driver); serio_driver_probe() local 796 return serio_connect_driver(serio, drv); serio_driver_probe() 810 if (serio->drv && serio->drv->cleanup) serio_cleanup() 811 serio->drv->cleanup(serio); serio_cleanup() 822 static void serio_attach_driver(struct serio_driver *drv) serio_attach_driver() argument 826 error = driver_attach(&drv->driver); serio_attach_driver() 829 drv->driver.name, error); serio_attach_driver() 832 int __serio_register_driver(struct serio_driver *drv, struct module *owner, const char *mod_name) __serio_register_driver() argument 834 bool manual_bind = drv->manual_bind; __serio_register_driver() 837 drv->driver.bus = &serio_bus; __serio_register_driver() 838 drv->driver.owner = owner; __serio_register_driver() 839 drv->driver.mod_name = mod_name; __serio_register_driver() 845 drv->manual_bind = true; __serio_register_driver() 847 error = driver_register(&drv->driver); __serio_register_driver() 850 drv->driver.name, error); __serio_register_driver() 859 drv->manual_bind = false; __serio_register_driver() 860 error = serio_queue_event(drv, NULL, SERIO_ATTACH_DRIVER); __serio_register_driver() 862 driver_unregister(&drv->driver); __serio_register_driver() 871 void serio_unregister_driver(struct serio_driver *drv) serio_unregister_driver() argument 877 drv->manual_bind = true; /* so serio_find_driver ignores it */ serio_unregister_driver() 878 serio_remove_pending_events(drv); serio_unregister_driver() 882 if (serio->drv == drv) { serio_unregister_driver() 890 driver_unregister(&drv->driver); serio_unregister_driver() 895 static void serio_set_drv(struct serio *serio, struct serio_driver *drv) serio_set_drv() argument 898 serio->drv = drv; serio_set_drv() 902 static int serio_bus_match(struct device *dev, struct device_driver *drv) serio_bus_match() argument 905 struct serio_driver *serio_drv = to_serio_driver(drv); serio_bus_match() 977 int serio_open(struct serio *serio, struct serio_driver *drv) serio_open() argument 979 serio_set_drv(serio, drv); serio_open() 1007 if (likely(serio->drv)) { serio_interrupt() 1008 ret = serio->drv->interrupt(serio, data, dfl); serio_interrupt()
|
H A D | hil_mlc.c | 168 struct serio_driver *drv; hil_mlc_send_polls() local 173 drv = (serio != NULL) ? serio->drv : NULL; hil_mlc_send_polls() 180 if (drv && drv->interrupt) { hil_mlc_send_polls() 181 drv->interrupt(serio, 0, 0); hil_mlc_send_polls() 182 drv->interrupt(serio, HIL_ERR_INT >> 16, 0); hil_mlc_send_polls() 183 drv->interrupt(serio, HIL_PKT_CMD >> 8, 0); hil_mlc_send_polls() 184 drv->interrupt(serio, HIL_CMD_POL + cnt, 0); hil_mlc_send_polls() 189 drv = (serio != NULL) ? serio->drv : NULL; hil_mlc_send_polls() 196 if (drv && drv->interrupt) { hil_mlc_send_polls() 197 drv->interrupt(serio, (p >> 24), 0); hil_mlc_send_polls() 198 drv->interrupt(serio, (p >> 16) & 0xff, 0); hil_mlc_send_polls() 199 drv->interrupt(serio, (p >> 8) & ~HIL_PKT_ADDR_MASK, 0); hil_mlc_send_polls() 200 drv->interrupt(serio, p & 0xff, 0); hil_mlc_send_polls() 802 struct serio_driver *drv; hil_mlc_serio_write() local 841 drv = serio->drv; hil_mlc_serio_write() 842 BUG_ON(drv == NULL); hil_mlc_serio_write() 849 drv->interrupt(serio, 0, 0); hil_mlc_serio_write() 850 drv->interrupt(serio, HIL_ERR_INT >> 16, 0); hil_mlc_serio_write() 851 drv->interrupt(serio, 0, 0); hil_mlc_serio_write() 852 drv->interrupt(serio, *idx, 0); hil_mlc_serio_write() 855 drv->interrupt(serio, 0, 0); hil_mlc_serio_write() 856 drv->interrupt(serio, HIL_ERR_INT >> 16, 0); hil_mlc_serio_write() 857 drv->interrupt(serio, HIL_PKT_CMD >> 8, 0); hil_mlc_serio_write() 858 drv->interrupt(serio, *idx, 0); hil_mlc_serio_write() 895 serio->drv = NULL; hil_mlc_serio_close()
|
H A D | serio_raw.c | 293 static int serio_raw_connect(struct serio *serio, struct serio_driver *drv) serio_raw_connect() argument 316 err = serio_open(serio, drv); serio_raw_connect() 362 struct serio_driver *drv = serio->drv; serio_raw_reconnect() local 364 if (!drv || !serio_raw) { serio_raw_reconnect()
|
/linux-4.1.27/drivers/virtio/ |
H A D | virtio.c | 112 struct virtio_driver *drv = drv_to_virtio(vdev->dev.driver); virtio_check_driver_offered_feature() local 114 for (i = 0; i < drv->feature_table_size; i++) virtio_check_driver_offered_feature() 115 if (drv->feature_table[i] == fbit) virtio_check_driver_offered_feature() 118 if (drv->feature_table_legacy) { virtio_check_driver_offered_feature() 119 for (i = 0; i < drv->feature_table_size_legacy; i++) virtio_check_driver_offered_feature() 120 if (drv->feature_table_legacy[i] == fbit) virtio_check_driver_offered_feature() 130 struct virtio_driver *drv = drv_to_virtio(dev->dev.driver); __virtio_config_changed() local 134 else if (drv && drv->config_changed) __virtio_config_changed() 135 drv->config_changed(dev); __virtio_config_changed() 190 struct virtio_driver *drv = drv_to_virtio(dev->dev.driver); virtio_dev_probe() local 203 for (i = 0; i < drv->feature_table_size; i++) { virtio_dev_probe() 204 unsigned int f = drv->feature_table[i]; virtio_dev_probe() 210 if (drv->feature_table_legacy) { virtio_dev_probe() 212 for (i = 0; i < drv->feature_table_size_legacy; i++) { virtio_dev_probe() 213 unsigned int f = drv->feature_table_legacy[i]; virtio_dev_probe() 235 err = drv->probe(dev); virtio_dev_probe() 243 if (drv->scan) virtio_dev_probe() 244 drv->scan(dev); virtio_dev_probe() 258 struct virtio_driver *drv = drv_to_virtio(dev->dev.driver); virtio_dev_remove() local 262 drv->remove(dev); virtio_dev_remove() 345 struct virtio_driver *drv = drv_to_virtio(dev->dev.driver); virtio_device_freeze() local 351 if (drv && drv->freeze) virtio_device_freeze() 352 return drv->freeze(dev); virtio_device_freeze() 360 struct virtio_driver *drv = drv_to_virtio(dev->dev.driver); virtio_device_restore() local 375 if (!drv) virtio_device_restore() 385 if (drv->restore) { virtio_device_restore() 386 ret = drv->restore(dev); virtio_device_restore()
|
/linux-4.1.27/sound/soc/intel/atom/sst/ |
H A D | sst.c | 59 struct intel_sst_drv *drv = (struct intel_sst_drv *) context; intel_sst_interrupt_mrfld() local 63 isr.full = sst_shim_read64(drv->shim, SST_ISRX); intel_sst_interrupt_mrfld() 67 spin_lock(&drv->ipc_spin_lock); intel_sst_interrupt_mrfld() 68 header.full = sst_shim_read64(drv->shim, intel_sst_interrupt_mrfld() 69 drv->ipc_reg.ipcx); intel_sst_interrupt_mrfld() 71 sst_shim_write64(drv->shim, drv->ipc_reg.ipcx, header.full); intel_sst_interrupt_mrfld() 75 sst_shim_write64(drv->shim, SST_ISRX, isr.full); intel_sst_interrupt_mrfld() 76 spin_unlock(&drv->ipc_spin_lock); intel_sst_interrupt_mrfld() 79 queue_work(drv->post_msg_wq, &drv->ipc_post_msg_wq); intel_sst_interrupt_mrfld() 85 spin_lock(&drv->ipc_spin_lock); intel_sst_interrupt_mrfld() 86 imr.full = sst_shim_read64(drv->shim, SST_IMRX); intel_sst_interrupt_mrfld() 88 sst_shim_write64(drv->shim, SST_IMRX, imr.full); intel_sst_interrupt_mrfld() 89 spin_unlock(&drv->ipc_spin_lock); intel_sst_interrupt_mrfld() 90 header.full = sst_shim_read64(drv->shim, drv->ipc_reg.ipcd); intel_sst_interrupt_mrfld() 93 drv->ops->clear_interrupt(drv); intel_sst_interrupt_mrfld() 101 drv->mailbox + drv->mailbox_recv_offset, size); intel_sst_interrupt_mrfld() 103 dev_err(drv->dev, intel_sst_interrupt_mrfld() 112 spin_lock(&drv->rx_msg_lock); intel_sst_interrupt_mrfld() 113 list_add_tail(&msg->node, &drv->rx_list); intel_sst_interrupt_mrfld() 114 spin_unlock(&drv->rx_msg_lock); intel_sst_interrupt_mrfld() 115 drv->ops->clear_interrupt(drv); intel_sst_interrupt_mrfld() 123 struct intel_sst_drv *drv = (struct intel_sst_drv *) context; intel_sst_irq_thread_mrfld() local 127 spin_lock_irqsave(&drv->rx_msg_lock, irq_flags); intel_sst_irq_thread_mrfld() 128 if (list_empty(&drv->rx_list)) { intel_sst_irq_thread_mrfld() 129 spin_unlock_irqrestore(&drv->rx_msg_lock, irq_flags); intel_sst_irq_thread_mrfld() 133 list_for_each_entry_safe(msg, __msg, &drv->rx_list, node) { intel_sst_irq_thread_mrfld() 135 spin_unlock_irqrestore(&drv->rx_msg_lock, irq_flags); intel_sst_irq_thread_mrfld() 137 drv->ops->process_message(msg); intel_sst_irq_thread_mrfld() 139 drv->ops->process_reply(drv, msg); intel_sst_irq_thread_mrfld() 144 spin_lock_irqsave(&drv->rx_msg_lock, irq_flags); intel_sst_irq_thread_mrfld() 146 spin_unlock_irqrestore(&drv->rx_msg_lock, irq_flags); intel_sst_irq_thread_mrfld() 278 dev_info(ctx->dev, "Got drv data max stream %d\n", sst_context_init()
|
H A D | sst_pvt.c | 346 int sst_assign_pvt_id(struct intel_sst_drv *drv) sst_assign_pvt_id() argument 350 spin_lock(&drv->block_lock); sst_assign_pvt_id() 352 local = ffz(drv->pvt_id); sst_assign_pvt_id() 353 dev_dbg(drv->dev, "pvt_id assigned --> %d\n", local); sst_assign_pvt_id() 355 spin_unlock(&drv->block_lock); sst_assign_pvt_id() 356 dev_err(drv->dev, "PVT _ID error: no free id blocks "); sst_assign_pvt_id() 360 change_bit(local, &drv->pvt_id); sst_assign_pvt_id() 361 spin_unlock(&drv->block_lock); sst_assign_pvt_id()
|
/linux-4.1.27/drivers/cpuidle/governors/ |
H A D | ladder.c | 63 * @drv: cpuidle driver 66 static int ladder_select_state(struct cpuidle_driver *drv, ladder_select_state() argument 82 last_residency = cpuidle_get_last_residency(dev) - drv->states[last_idx].exit_latency; ladder_select_state() 85 if (last_idx < drv->state_count - 1 && ladder_select_state() 86 !drv->states[last_idx + 1].disabled && ladder_select_state() 89 drv->states[last_idx + 1].exit_latency <= latency_req) { ladder_select_state() 100 (drv->states[last_idx].disabled || ladder_select_state() 102 drv->states[last_idx].exit_latency > latency_req)) { ladder_select_state() 106 if (drv->states[i].exit_latency <= latency_req) ladder_select_state() 129 * @drv: cpuidle driver 132 static int ladder_enable_device(struct cpuidle_driver *drv, ladder_enable_device() argument 142 for (i = CPUIDLE_DRIVER_STATE_START; i < drv->state_count; i++) { ladder_enable_device() 143 state = &drv->states[i]; ladder_enable_device() 152 if (i < drv->state_count - 1) ladder_enable_device()
|
H A D | menu.c | 191 static void menu_update(struct cpuidle_driver *drv, struct cpuidle_device *dev); 281 * @drv: cpuidle driver containing state data 284 static int menu_select(struct cpuidle_driver *drv, struct cpuidle_device *dev) menu_select() argument 293 menu_update(drv, dev); menu_select() 334 !drv->states[CPUIDLE_DRIVER_STATE_START].disabled && menu_select() 342 for (i = CPUIDLE_DRIVER_STATE_START; i < drv->state_count; i++) { menu_select() 343 struct cpuidle_state *s = &drv->states[i]; menu_select() 377 * @drv: cpuidle driver containing state data 380 static void menu_update(struct cpuidle_driver *drv, struct cpuidle_device *dev) menu_update() argument 384 struct cpuidle_state *target = &drv->states[last_idx]; menu_update() 446 * @drv: cpuidle driver 449 static int menu_enable_device(struct cpuidle_driver *drv, menu_enable_device() argument
|
/linux-4.1.27/arch/arm/mach-tegra/ |
H A D | cpuidle-tegra30.c | 38 struct cpuidle_driver *drv, 67 struct cpuidle_driver *drv, tegra30_cpu_cluster_power_down() 89 struct cpuidle_driver *drv, tegra30_cpu_core_power_down() 104 struct cpuidle_driver *drv, tegra30_cpu_core_power_down() 112 struct cpuidle_driver *drv, tegra30_idle_lp2() 125 entered_lp2 = tegra30_cpu_cluster_power_down(dev, drv, tegra30_idle_lp2() 130 entered_lp2 = tegra30_cpu_core_power_down(dev, drv, index); tegra30_idle_lp2() 66 tegra30_cpu_cluster_power_down(struct cpuidle_device *dev, struct cpuidle_driver *drv, int index) tegra30_cpu_cluster_power_down() argument 88 tegra30_cpu_core_power_down(struct cpuidle_device *dev, struct cpuidle_driver *drv, int index) tegra30_cpu_core_power_down() argument 103 tegra30_cpu_core_power_down(struct cpuidle_device *dev, struct cpuidle_driver *drv, int index) tegra30_cpu_core_power_down() argument 111 tegra30_idle_lp2(struct cpuidle_device *dev, struct cpuidle_driver *drv, int index) tegra30_idle_lp2() argument
|
H A D | cpuidle-tegra20.c | 44 struct cpuidle_driver *drv, 128 struct cpuidle_driver *drv, tegra20_cpu_cluster_power_down() 151 struct cpuidle_driver *drv, tegra20_idle_enter_lp2_cpu_1() 166 struct cpuidle_driver *drv, tegra20_idle_enter_lp2_cpu_1() 174 struct cpuidle_driver *drv, tegra20_idle_lp2_coupled() 196 entered_lp2 = tegra20_cpu_cluster_power_down(dev, drv, index); tegra20_idle_lp2_coupled() 198 entered_lp2 = tegra20_idle_enter_lp2_cpu_1(dev, drv, index); tegra20_idle_lp2_coupled() 127 tegra20_cpu_cluster_power_down(struct cpuidle_device *dev, struct cpuidle_driver *drv, int index) tegra20_cpu_cluster_power_down() argument 150 tegra20_idle_enter_lp2_cpu_1(struct cpuidle_device *dev, struct cpuidle_driver *drv, int index) tegra20_idle_enter_lp2_cpu_1() argument 165 tegra20_idle_enter_lp2_cpu_1(struct cpuidle_device *dev, struct cpuidle_driver *drv, int index) tegra20_idle_enter_lp2_cpu_1() argument 173 tegra20_idle_lp2_coupled(struct cpuidle_device *dev, struct cpuidle_driver *drv, int index) tegra20_idle_lp2_coupled() argument
|
/linux-4.1.27/net/dsa/ |
H A D | slave.c | 29 return ds->drv->phy_read(ds, addr, reg); dsa_slave_phy_read() 39 return ds->drv->phy_write(ds, addr, reg, val); dsa_slave_phy_write() 99 if (ds->drv->port_enable) { dsa_slave_open() 100 err = ds->drv->port_enable(ds, p->port, p->phy); dsa_slave_open() 105 if (ds->drv->port_stp_update) dsa_slave_open() 106 ds->drv->port_stp_update(ds, p->port, stp_state); dsa_slave_open() 145 if (ds->drv->port_disable) dsa_slave_close() 146 ds->drv->port_disable(ds, p->port, p->phy); dsa_slave_close() 148 if (ds->drv->port_stp_update) dsa_slave_close() 149 ds->drv->port_stp_update(ds, p->port, BR_STATE_DISABLED); dsa_slave_close() 210 if (ds->drv->fdb_add) dsa_slave_fdb_add() 211 ret = ds->drv->fdb_add(ds, p->port, addr, vid); dsa_slave_fdb_add() 224 if (ds->drv->fdb_del) dsa_slave_fdb_del() 225 ret = ds->drv->fdb_del(ds, p->port, addr, vid); dsa_slave_fdb_del() 276 if (!ds->drv->fdb_getnext) dsa_slave_fdb_dump() 282 ret = ds->drv->fdb_getnext(ds, p->port, addr, &is_static); dsa_slave_fdb_dump() 342 if (ds->drv->port_stp_update) dsa_slave_stp_update() 343 ret = ds->drv->port_stp_update(ds, p->port, state); dsa_slave_stp_update() 357 if (ds->drv->port_join_bridge) dsa_slave_bridge_port_join() 358 ret = ds->drv->port_join_bridge(ds, p->port, dsa_slave_bridge_port_join() 371 if (ds->drv->port_leave_bridge) dsa_slave_bridge_port_leave() 372 ret = ds->drv->port_leave_bridge(ds, p->port, dsa_slave_bridge_port_leave() 458 if (ds->drv->get_regs_len) dsa_slave_get_regs_len() 459 return ds->drv->get_regs_len(ds, p->port); dsa_slave_get_regs_len() 470 if (ds->drv->get_regs) dsa_slave_get_regs() 471 ds->drv->get_regs(ds, p->port, regs, _p); dsa_slave_get_regs() 504 if (ds->drv->get_eeprom_len) dsa_slave_get_eeprom_len() 505 return ds->drv->get_eeprom_len(ds); dsa_slave_get_eeprom_len() 516 if (ds->drv->get_eeprom) dsa_slave_get_eeprom() 517 return ds->drv->get_eeprom(ds, eeprom, data); dsa_slave_get_eeprom() 528 if (ds->drv->set_eeprom) dsa_slave_set_eeprom() 529 return ds->drv->set_eeprom(ds, eeprom, data); dsa_slave_set_eeprom() 547 if (ds->drv->get_strings != NULL) dsa_slave_get_strings() 548 ds->drv->get_strings(ds, p->port, data + 4 * len); dsa_slave_get_strings() 563 if (ds->drv->get_ethtool_stats != NULL) dsa_slave_get_ethtool_stats() 564 ds->drv->get_ethtool_stats(ds, p->port, data + 4); dsa_slave_get_ethtool_stats() 576 if (ds->drv->get_sset_count != NULL) dsa_slave_get_sset_count() 577 count += ds->drv->get_sset_count(ds); dsa_slave_get_sset_count() 590 if (ds->drv->get_wol) dsa_slave_get_wol() 591 ds->drv->get_wol(ds, p->port, w); dsa_slave_get_wol() 600 if (ds->drv->set_wol) dsa_slave_set_wol() 601 ret = ds->drv->set_wol(ds, p->port, w); dsa_slave_set_wol() 612 if (!ds->drv->set_eee) dsa_slave_set_eee() 615 ret = ds->drv->set_eee(ds, p->port, p->phy, e); dsa_slave_set_eee() 631 if (!ds->drv->get_eee) dsa_slave_get_eee() 634 ret = ds->drv->get_eee(ds, p->port, e); dsa_slave_get_eee() 704 if (ds->drv->adjust_link && status_changed) dsa_slave_adjust_link() 705 ds->drv->adjust_link(ds, p->port, p->phy); dsa_slave_adjust_link() 717 if (ds->drv->fixed_link_update) dsa_slave_fixed_link_update() 718 ds->drv->fixed_link_update(ds, p->port, status); dsa_slave_fixed_link_update() 773 if (ds->drv->get_phy_flags) dsa_slave_phy_setup() 774 phy_flags = ds->drv->get_phy_flags(ds, p->port); dsa_slave_phy_setup() 808 p->phy->addr, p->phy->drv->name); dsa_slave_phy_setup()
|
H A D | dsa.c | 34 void register_switch_driver(struct dsa_switch_driver *drv) register_switch_driver() argument 37 list_add_tail(&drv->list, &dsa_switch_drivers); register_switch_driver() 42 void unregister_switch_driver(struct dsa_switch_driver *drv) unregister_switch_driver() argument 45 list_del_init(&drv->list); unregister_switch_driver() 62 struct dsa_switch_driver *drv; dsa_switch_probe() local 64 drv = list_entry(list, struct dsa_switch_driver, list); dsa_switch_probe() 66 name = drv->probe(host_dev, sw_addr); dsa_switch_probe() 68 ret = drv; dsa_switch_probe() 89 ret = ds->drv->get_temp(ds, &temp); temp1_input_show() 103 ret = ds->drv->get_temp_limit(ds, &temp); temp1_max_show() 121 ret = ds->drv->set_temp_limit(ds, DIV_ROUND_CLOSEST(temp, 1000)); temp1_max_store() 136 ret = ds->drv->get_temp_alarm(ds, &alarm); temp1_max_alarm_show() 156 struct dsa_switch_driver *drv = ds->drv; dsa_hwmon_attrs_visible() local 160 if (!drv->get_temp_limit) dsa_hwmon_attrs_visible() 162 else if (!drv->set_temp_limit) dsa_hwmon_attrs_visible() 164 } else if (index == 2 && !drv->get_temp_alarm) { dsa_hwmon_attrs_visible() 181 struct dsa_switch_driver *drv = ds->drv; dsa_switch_setup_one() local 265 ret = drv->setup(ds); dsa_switch_setup_one() 269 ret = drv->set_addr(ds, dst->master_netdev->dev_addr); dsa_switch_setup_one() 305 if (drv->get_temp) { dsa_switch_setup_one() 339 struct dsa_switch_driver *drv; dsa_switch_setup() local 347 drv = dsa_switch_probe(host_dev, pd->sw_addr, &name); dsa_switch_setup() 348 if (drv == NULL) { dsa_switch_setup() 360 ds = kzalloc(sizeof(*ds) + drv->priv_size, GFP_KERNEL); dsa_switch_setup() 367 ds->drv = drv; dsa_switch_setup() 368 ds->tag_protocol = drv->tag_protocol; dsa_switch_setup() 401 if (ds->drv->suspend) dsa_switch_suspend() 402 ret = ds->drv->suspend(ds); dsa_switch_suspend() 411 if (ds->drv->resume) dsa_switch_resume() 412 ret = ds->drv->resume(ds); dsa_switch_resume() 443 if (ds != NULL && ds->drv->poll_link != NULL) dsa_link_poll_work() 444 ds->drv->poll_link(ds); dsa_link_poll_work() 726 if (ds->drv->poll_link != NULL) dsa_setup_dst()
|
/linux-4.1.27/drivers/tty/serial/ |
H A D | suncore.c | 28 int sunserial_register_minors(struct uart_driver *drv, int count) sunserial_register_minors() argument 32 drv->minor = sunserial_current_minor; sunserial_register_minors() 33 drv->nr += count; sunserial_register_minors() 35 if (drv->nr == count) sunserial_register_minors() 36 err = uart_register_driver(drv); sunserial_register_minors() 39 drv->tty_driver->name_base = drv->minor - 64; sunserial_register_minors() 45 void sunserial_unregister_minors(struct uart_driver *drv, int count) sunserial_unregister_minors() argument 47 drv->nr -= count; sunserial_unregister_minors() 50 if (drv->nr == 0) sunserial_unregister_minors() 51 uart_unregister_driver(drv); sunserial_unregister_minors() 56 struct uart_driver *drv, int line, bool ignore_line) sunserial_console_match() 61 drv->cons = con; sunserial_console_match() 55 sunserial_console_match(struct console *con, struct device_node *dp, struct uart_driver *drv, int line, bool ignore_line) sunserial_console_match() argument
|
H A D | serial_core.c | 1374 struct uart_driver *drv = tty->driver->driver_state; uart_close() local 1376 state = drv->state + tty->index; uart_close() 1593 struct uart_driver *drv = (struct uart_driver *)tty->driver->driver_state; uart_open() local 1595 struct uart_state *state = drv->state + line; uart_open() 1661 static void uart_line_info(struct seq_file *m, struct uart_driver *drv, int i) uart_line_info() argument 1663 struct uart_state *state = drv->state + i; uart_line_info() 1744 struct uart_driver *drv = ttydrv->driver_state; uart_proc_show() local 1749 for (i = 0; i < drv->nr; i++) uart_proc_show() 1750 uart_line_info(m, drv, i); uart_proc_show() 2019 int uart_suspend_port(struct uart_driver *drv, struct uart_port *uport) uart_suspend_port() argument 2021 struct uart_state *state = drv->state + uport->line; uart_suspend_port() 2024 struct uart_match match = {uport, drv}; uart_suspend_port() 2064 drv->dev_name, uart_suspend_port() 2065 drv->tty_driver->name_base + uport->line); uart_suspend_port() 2083 int uart_resume_port(struct uart_driver *drv, struct uart_port *uport) uart_resume_port() argument 2085 struct uart_state *state = drv->state + uport->line; uart_resume_port() 2088 struct uart_match match = {uport, drv}; uart_resume_port() 2168 uart_report_port(struct uart_driver *drv, struct uart_port *port) uart_report_port() argument 2196 drv->dev_name, uart_report_port() 2197 drv->tty_driver->name_base + port->line, uart_report_port() 2202 uart_configure_port(struct uart_driver *drv, struct uart_state *state, uart_configure_port() argument 2231 uart_report_port(drv, port); uart_configure_port() 2266 struct uart_driver *drv = driver->driver_state; uart_poll_init() local 2267 struct uart_state *state = drv->state + line; uart_poll_init() 2308 struct uart_driver *drv = driver->driver_state; uart_poll_get_char() local 2309 struct uart_state *state = drv->state + line; uart_poll_get_char() 2321 struct uart_driver *drv = driver->driver_state; uart_poll_put_char() local 2322 struct uart_state *state = drv->state + line; uart_poll_put_char() 2378 * @drv: low level driver structure 2386 * drv->port should be NULL, and the per-port structures should be 2389 int uart_register_driver(struct uart_driver *drv) uart_register_driver() argument 2394 BUG_ON(drv->state); uart_register_driver() 2400 drv->state = kzalloc(sizeof(struct uart_state) * drv->nr, GFP_KERNEL); uart_register_driver() 2401 if (!drv->state) uart_register_driver() 2404 normal = alloc_tty_driver(drv->nr); uart_register_driver() 2408 drv->tty_driver = normal; uart_register_driver() 2410 normal->driver_name = drv->driver_name; uart_register_driver() 2411 normal->name = drv->dev_name; uart_register_driver() 2412 normal->major = drv->major; uart_register_driver() 2413 normal->minor_start = drv->minor; uart_register_driver() 2420 normal->driver_state = drv; uart_register_driver() 2426 for (i = 0; i < drv->nr; i++) { uart_register_driver() 2427 struct uart_state *state = drv->state + i; uart_register_driver() 2438 for (i = 0; i < drv->nr; i++) uart_register_driver() 2439 tty_port_destroy(&drv->state[i].port); uart_register_driver() 2442 kfree(drv->state); uart_register_driver() 2449 * @drv: low level driver structure 2454 * (ie, drv->port == NULL) 2456 void uart_unregister_driver(struct uart_driver *drv) uart_unregister_driver() argument 2458 struct tty_driver *p = drv->tty_driver; uart_unregister_driver() 2463 for (i = 0; i < drv->nr; i++) uart_unregister_driver() 2464 tty_port_destroy(&drv->state[i].port); uart_unregister_driver() 2465 kfree(drv->state); uart_unregister_driver() 2466 drv->state = NULL; uart_unregister_driver() 2467 drv->tty_driver = NULL; uart_unregister_driver() 2649 * @drv: pointer to the uart low level driver structure for this port 2657 int uart_add_one_port(struct uart_driver *drv, struct uart_port *uport) uart_add_one_port() argument 2667 if (uport->line >= drv->nr) uart_add_one_port() 2670 state = drv->state + uport->line; uart_add_one_port() 2685 uport->cons = drv->cons; uart_add_one_port() 2686 uport->minor = drv->tty_driver->minor_start + uport->line; uart_add_one_port() 2699 uart_configure_port(drv, state, uport); uart_add_one_port() 2719 tty_dev = tty_port_register_device_attr(port, drv->tty_driver, uart_add_one_port() 2742 * @drv: pointer to the uart low level driver structure for this port 2749 int uart_remove_one_port(struct uart_driver *drv, struct uart_port *uport) uart_remove_one_port() argument 2751 struct uart_state *state = drv->state + uport->line; uart_remove_one_port() 2780 tty_unregister_device(drv->tty_driver, uport->line); uart_remove_one_port()
|
/linux-4.1.27/drivers/misc/ |
H A D | tifm_core.c | 45 static int tifm_bus_match(struct device *dev, struct device_driver *drv) tifm_bus_match() argument 48 struct tifm_driver *fm_drv = container_of(drv, struct tifm_driver, tifm_bus_match() 75 struct tifm_driver *drv = container_of(dev->driver, struct tifm_driver, tifm_device_probe() local 80 if (dev->driver && drv->probe) { tifm_device_probe() 81 rc = drv->probe(sock); tifm_device_probe() 97 struct tifm_driver *drv = container_of(dev->driver, struct tifm_driver, tifm_device_remove() local 100 if (dev->driver && drv->remove) { tifm_device_remove() 103 drv->remove(sock); tifm_device_remove() 116 struct tifm_driver *drv = container_of(dev->driver, struct tifm_driver, tifm_device_suspend() local 119 if (dev->driver && drv->suspend) tifm_device_suspend() 120 return drv->suspend(sock, state); tifm_device_suspend() 127 struct tifm_driver *drv = container_of(dev->driver, struct tifm_driver, tifm_device_resume() local 130 if (dev->driver && drv->resume) tifm_device_resume() 131 return drv->resume(sock); tifm_device_resume() 318 int tifm_register_driver(struct tifm_driver *drv) tifm_register_driver() argument 320 drv->driver.bus = &tifm_bus_type; tifm_register_driver() 322 return driver_register(&drv->driver); tifm_register_driver() 326 void tifm_unregister_driver(struct tifm_driver *drv) tifm_unregister_driver() argument 328 driver_unregister(&drv->driver); tifm_unregister_driver()
|
/linux-4.1.27/drivers/media/pci/cx88/ |
H A D | cx88-mpeg.c | 524 static int cx8802_request_acquire(struct cx8802_driver *drv) cx8802_request_acquire() argument 526 struct cx88_core *core = drv->core; cx8802_request_acquire() 531 core->active_type_id != drv->type_id) cx8802_request_acquire() 534 if (drv->type_id == CX88_MPEG_DVB) { cx8802_request_acquire() 548 if (drv->advise_acquire) cx8802_request_acquire() 552 core->active_type_id = drv->type_id; cx8802_request_acquire() 553 drv->advise_acquire(drv); cx8802_request_acquire() 563 static int cx8802_request_release(struct cx8802_driver *drv) cx8802_request_release() argument 565 struct cx88_core *core = drv->core; cx8802_request_release() 567 if (drv->advise_release && --core->active_ref == 0) cx8802_request_release() 569 if (drv->type_id == CX88_MPEG_DVB) { cx8802_request_release() 575 drv->advise_release(drv); cx8802_request_release() 583 static int cx8802_check_driver(struct cx8802_driver *drv) cx8802_check_driver() argument 585 if (drv == NULL) cx8802_check_driver() 588 if ((drv->type_id != CX88_MPEG_DVB) && cx8802_check_driver() 589 (drv->type_id != CX88_MPEG_BLACKBIRD)) cx8802_check_driver() 592 if ((drv->hw_access != CX8802_DRVCTL_SHARED) && cx8802_check_driver() 593 (drv->hw_access != CX8802_DRVCTL_EXCLUSIVE)) cx8802_check_driver() 596 if ((drv->probe == NULL) || cx8802_check_driver() 597 (drv->remove == NULL) || cx8802_check_driver() 598 (drv->advise_acquire == NULL) || cx8802_check_driver() 599 (drv->advise_release == NULL)) cx8802_check_driver() 605 int cx8802_register_driver(struct cx8802_driver *drv) cx8802_register_driver() argument 613 drv->type_id == CX88_MPEG_DVB ? "dvb" : "blackbird", cx8802_register_driver() 614 drv->hw_access == CX8802_DRVCTL_SHARED ? "shared" : "exclusive"); cx8802_register_driver() 616 if ((err = cx8802_check_driver(drv)) != 0) { cx8802_register_driver() 631 driver = kzalloc(sizeof(*drv),GFP_KERNEL); cx8802_register_driver() 638 drv->core = dev->core; cx8802_register_driver() 639 drv->suspend = cx8802_suspend_common; cx8802_register_driver() 640 drv->resume = cx8802_resume_common; cx8802_register_driver() 641 drv->request_acquire = cx8802_request_acquire; cx8802_register_driver() 642 drv->request_release = cx8802_request_release; cx8802_register_driver() 643 memcpy(driver, drv, sizeof(*driver)); cx8802_register_driver() 645 mutex_lock(&drv->core->lock); cx8802_register_driver() 646 err = drv->probe(driver); cx8802_register_driver() 655 mutex_unlock(&drv->core->lock); cx8802_register_driver() 664 int cx8802_unregister_driver(struct cx8802_driver *drv) cx8802_unregister_driver() argument 672 drv->type_id == CX88_MPEG_DVB ? "dvb" : "blackbird", cx8802_unregister_driver() 673 drv->hw_access == CX8802_DRVCTL_SHARED ? "shared" : "exclusive"); cx8802_unregister_driver() 688 if (d->type_id != drv->type_id) cx8802_unregister_driver() 778 struct cx8802_driver *drv, *tmp; cx8802_remove() local 785 list_for_each_entry_safe(drv, tmp, &dev->drvlist, drvlist) { cx8802_remove() 786 err = drv->remove(drv); cx8802_remove() 788 list_del(&drv->drvlist); cx8802_remove() 792 kfree(drv); cx8802_remove()
|
H A D | cx88-blackbird.c | 685 struct cx8802_driver *drv; start_streaming() local 691 drv = cx8802_get_driver(dev, CX88_MPEG_BLACKBIRD); start_streaming() 692 if (!drv) { start_streaming() 698 err = drv->request_acquire(drv); start_streaming() 705 drv->request_release(drv); start_streaming() 734 struct cx8802_driver *drv = NULL; stop_streaming() local 741 drv = cx8802_get_driver(dev, CX88_MPEG_BLACKBIRD); stop_streaming() 742 WARN_ON(!drv); stop_streaming() 743 if (drv) stop_streaming() 744 drv->request_release(drv); stop_streaming() 1058 static int cx8802_blackbird_advise_acquire(struct cx8802_driver *drv) cx8802_blackbird_advise_acquire() argument 1060 struct cx88_core *core = drv->core; cx8802_blackbird_advise_acquire() 1088 static int cx8802_blackbird_advise_release(struct cx8802_driver *drv) cx8802_blackbird_advise_release() argument 1090 struct cx88_core *core = drv->core; cx8802_blackbird_advise_release() 1130 static int cx8802_blackbird_probe(struct cx8802_driver *drv) cx8802_blackbird_probe() argument 1132 struct cx88_core *core = drv->core; cx8802_blackbird_probe() 1196 static int cx8802_blackbird_remove(struct cx8802_driver *drv) cx8802_blackbird_remove() argument 1198 struct cx88_core *core = drv->core; cx8802_blackbird_remove() 1202 blackbird_unregister_video(drv->core->dvbdev); cx8802_blackbird_remove()
|
/linux-4.1.27/include/sound/ |
H A D | seq_device.h | 81 int __must_check __snd_seq_driver_register(struct snd_seq_driver *drv, 83 #define snd_seq_driver_register(drv) \ 84 __snd_seq_driver_register(drv, THIS_MODULE) 85 void snd_seq_driver_unregister(struct snd_seq_driver *drv); 87 #define module_snd_seq_driver(drv) \ 88 module_driver(drv, snd_seq_driver_register, snd_seq_driver_unregister)
|
/linux-4.1.27/arch/mips/sgi-ip22/ |
H A D | ip22-gio.c | 113 static int gio_bus_match(struct device *dev, struct device_driver *drv) gio_bus_match() argument 116 struct gio_driver *gio_drv = to_gio_driver(drv); gio_bus_match() 124 struct gio_driver *drv; gio_device_probe() local 128 drv = to_gio_driver(dev->driver); gio_device_probe() 131 if (!drv->probe) gio_device_probe() 136 match = gio_match_device(drv->id_table, gio_dev); gio_device_probe() 138 error = drv->probe(gio_dev, match); gio_device_probe() 148 struct gio_driver *drv = to_gio_driver(dev->driver); gio_device_remove() local 150 if (dev->driver && drv->remove) gio_device_remove() 151 drv->remove(gio_dev); gio_device_remove() 158 struct gio_driver *drv = to_gio_driver(dev->driver); gio_device_shutdown() local 160 if (dev->driver && drv->shutdown) gio_device_shutdown() 161 drv->shutdown(gio_dev); gio_device_shutdown() 206 int gio_register_driver(struct gio_driver *drv) gio_register_driver() argument 209 if (!drv->driver.name) gio_register_driver() 210 drv->driver.name = drv->name; gio_register_driver() 211 if (!drv->driver.owner) gio_register_driver() 212 drv->driver.owner = drv->owner; gio_register_driver() 213 drv->driver.bus = &gio_bus_type; gio_register_driver() 216 return driver_register(&drv->driver); gio_register_driver() 220 void gio_unregister_driver(struct gio_driver *drv) gio_unregister_driver() argument 222 driver_unregister(&drv->driver); gio_unregister_driver()
|
/linux-4.1.27/drivers/input/gameport/ |
H A D | gameport.c | 49 static void gameport_attach_driver(struct gameport_driver *drv); 218 static int gameport_bind_driver(struct gameport *gameport, struct gameport_driver *drv) gameport_bind_driver() argument 222 gameport->dev.driver = &drv->driver; gameport_bind_driver() 223 if (drv->connect(gameport, drv)) { gameport_bind_driver() 233 drv->description, error); gameport_bind_driver() 234 drv->disconnect(gameport); gameport_bind_driver() 473 struct device_driver *drv; drvctl_store() local 487 } else if ((drv = driver_find(buf, &gameport_bus)) != NULL) { drvctl_store() 489 error = gameport_bind_driver(gameport, to_gameport_driver(drv)); drvctl_store() 615 if (!gameport->drv || !gameport->drv->reconnect || gameport->drv->reconnect(gameport)) { gameport_reconnect_port() 684 static ssize_t description_show(struct device_driver *drv, char *buf) description_show() argument 686 struct gameport_driver *driver = to_gameport_driver(drv); description_show() 700 struct gameport_driver *drv = to_gameport_driver(dev->driver); gameport_driver_probe() local 702 drv->connect(gameport, drv); gameport_driver_probe() 703 return gameport->drv ? 0 : -ENODEV; gameport_driver_probe() 709 struct gameport_driver *drv = to_gameport_driver(dev->driver); gameport_driver_remove() local 711 drv->disconnect(gameport); gameport_driver_remove() 715 static void gameport_attach_driver(struct gameport_driver *drv) gameport_attach_driver() argument 719 error = driver_attach(&drv->driver); gameport_attach_driver() 722 drv->driver.name, error); gameport_attach_driver() 725 int __gameport_register_driver(struct gameport_driver *drv, struct module *owner, __gameport_register_driver() argument 730 drv->driver.bus = &gameport_bus; __gameport_register_driver() 731 drv->driver.owner = owner; __gameport_register_driver() 732 drv->driver.mod_name = mod_name; __gameport_register_driver() 738 drv->ignore = true; __gameport_register_driver() 740 error = driver_register(&drv->driver); __gameport_register_driver() 743 drv->driver.name, error); __gameport_register_driver() 750 drv->ignore = false; __gameport_register_driver() 751 error = gameport_queue_event(drv, NULL, GAMEPORT_ATTACH_DRIVER); __gameport_register_driver() 753 driver_unregister(&drv->driver); __gameport_register_driver() 761 void gameport_unregister_driver(struct gameport_driver *drv) gameport_unregister_driver() argument 767 drv->ignore = true; /* so gameport_find_driver ignores it */ gameport_unregister_driver() 768 gameport_remove_pending_events(drv); gameport_unregister_driver() 772 if (gameport->drv == drv) { gameport_unregister_driver() 780 driver_unregister(&drv->driver); gameport_unregister_driver() 786 static int gameport_bus_match(struct device *dev, struct device_driver *drv) gameport_bus_match() argument 788 struct gameport_driver *gameport_drv = to_gameport_driver(drv); gameport_bus_match() 802 static void gameport_set_drv(struct gameport *gameport, struct gameport_driver *drv) gameport_set_drv() argument 805 gameport->drv = drv; gameport_set_drv() 809 int gameport_open(struct gameport *gameport, struct gameport_driver *drv, int mode) gameport_open() argument 820 gameport_set_drv(gameport, drv); gameport_open()
|
/linux-4.1.27/sound/hda/ |
H A D | hda_bus_type.c | 13 static int hda_bus_match(struct device *dev, struct device_driver *drv) hda_bus_match() argument 16 struct hdac_driver *hdrv = drv_to_hdac_driver(drv); hda_bus_match()
|
H A D | hdac_bus.c | 139 struct hdac_driver *drv; process_unsol_events() local 153 drv = drv_to_hdac_driver(codec->dev.driver); process_unsol_events() 154 if (drv->unsol_event) process_unsol_events() 155 drv->unsol_event(codec, res); process_unsol_events()
|
/linux-4.1.27/drivers/isdn/gigaset/ |
H A D | common.c | 405 static struct cardstate *alloc_cs(struct gigaset_driver *drv) alloc_cs() argument 412 spin_lock_irqsave(&drv->lock, flags); alloc_cs() 413 if (drv->blocked) alloc_cs() 415 for (i = 0; i < drv->minors; ++i) { alloc_cs() 416 cs = drv->cs + i; alloc_cs() 424 spin_unlock_irqrestore(&drv->lock, flags); alloc_cs() 436 struct gigaset_driver *drv = cs->driver; make_valid() local 437 spin_lock_irqsave(&drv->lock, flags); make_valid() 439 spin_unlock_irqrestore(&drv->lock, flags); make_valid() 445 struct gigaset_driver *drv = cs->driver; make_invalid() local 446 spin_lock_irqsave(&drv->lock, flags); make_invalid() 448 spin_unlock_irqrestore(&drv->lock, flags); make_invalid() 653 * @drv: hardware driver the device belongs to 669 struct cardstate *gigaset_initcs(struct gigaset_driver *drv, int channels, gigaset_initcs() argument 678 cs = alloc_cs(drv); gigaset_initcs() 986 struct gigaset_driver *drv; gigaset_get_cs_by_id() local 990 list_for_each_entry(drv, &drivers, list) { gigaset_get_cs_by_id() 991 spin_lock(&drv->lock); gigaset_get_cs_by_id() 992 for (i = 0; i < drv->minors; ++i) { gigaset_get_cs_by_id() 993 cs = drv->cs + i; gigaset_get_cs_by_id() 999 spin_unlock(&drv->lock); gigaset_get_cs_by_id() 1011 struct gigaset_driver *drv; gigaset_get_cs_by_minor() local 1015 list_for_each_entry(drv, &drivers, list) { gigaset_get_cs_by_minor() 1016 if (minor < drv->minor || minor >= drv->minor + drv->minors) gigaset_get_cs_by_minor() 1018 index = minor - drv->minor; gigaset_get_cs_by_minor() 1019 spin_lock(&drv->lock); gigaset_get_cs_by_minor() 1020 if (drv->cs[index].flags & VALID_MINOR) gigaset_get_cs_by_minor() 1021 ret = drv->cs + index; gigaset_get_cs_by_minor() 1022 spin_unlock(&drv->lock); gigaset_get_cs_by_minor() 1037 * @drv: driver descriptor structure. 1040 * structure @drv and all structures referenced from it. 1043 void gigaset_freedriver(struct gigaset_driver *drv) gigaset_freedriver() argument 1048 list_del(&drv->list); gigaset_freedriver() 1051 gigaset_if_freedriver(drv); gigaset_freedriver() 1053 kfree(drv->cs); gigaset_freedriver() 1054 kfree(drv); gigaset_freedriver() 1076 struct gigaset_driver *drv; gigaset_initdriver() local 1080 drv = kmalloc(sizeof *drv, GFP_KERNEL); gigaset_initdriver() 1081 if (!drv) gigaset_initdriver() 1084 drv->have_tty = 0; gigaset_initdriver() 1085 drv->minor = minor; gigaset_initdriver() 1086 drv->minors = minors; gigaset_initdriver() 1087 spin_lock_init(&drv->lock); gigaset_initdriver() 1088 drv->blocked = 0; gigaset_initdriver() 1089 drv->ops = ops; gigaset_initdriver() 1090 drv->owner = owner; gigaset_initdriver() 1091 INIT_LIST_HEAD(&drv->list); gigaset_initdriver() 1093 drv->cs = kmalloc(minors * sizeof *drv->cs, GFP_KERNEL); gigaset_initdriver() 1094 if (!drv->cs) gigaset_initdriver() 1098 drv->cs[i].flags = 0; gigaset_initdriver() 1099 drv->cs[i].driver = drv; gigaset_initdriver() 1100 drv->cs[i].ops = drv->ops; gigaset_initdriver() 1101 drv->cs[i].minor_index = i; gigaset_initdriver() 1102 mutex_init(&drv->cs[i].mutex); gigaset_initdriver() 1105 gigaset_if_initdriver(drv, procname, devname); gigaset_initdriver() 1108 list_add(&drv->list, &drivers); gigaset_initdriver() 1111 return drv; gigaset_initdriver() 1114 kfree(drv); gigaset_initdriver() 1121 * @drv: driver descriptor structure. 1126 void gigaset_blockdriver(struct gigaset_driver *drv) gigaset_blockdriver() argument 1128 drv->blocked = 1; gigaset_blockdriver()
|
H A D | interface.c | 498 struct gigaset_driver *drv; gigaset_if_init() local 500 drv = cs->driver; gigaset_if_init() 501 if (!drv->have_tty) gigaset_if_init() 507 cs->tty_dev = tty_port_register_device(&cs->port, drv->tty, gigaset_if_init() 521 struct gigaset_driver *drv; gigaset_if_free() local 523 drv = cs->driver; gigaset_if_free() 524 if (!drv->have_tty) gigaset_if_free() 530 tty_unregister_device(drv->tty, cs->minor_index); gigaset_if_free() 553 * drv Driver 557 void gigaset_if_initdriver(struct gigaset_driver *drv, const char *procname, gigaset_if_initdriver() argument 563 drv->have_tty = 0; gigaset_if_initdriver() 565 drv->tty = tty = alloc_tty_driver(drv->minors); gigaset_if_initdriver() 575 tty->minor_start = drv->minor; gigaset_if_initdriver() 587 drv->have_tty = 1; gigaset_if_initdriver() 593 if (drv->tty) gigaset_if_initdriver() 594 put_tty_driver(drv->tty); gigaset_if_initdriver() 597 void gigaset_if_freedriver(struct gigaset_driver *drv) gigaset_if_freedriver() argument 599 if (!drv->have_tty) gigaset_if_freedriver() 602 drv->have_tty = 0; gigaset_if_freedriver() 603 tty_unregister_driver(drv->tty); gigaset_if_freedriver() 604 put_tty_driver(drv->tty); gigaset_if_freedriver()
|
/linux-4.1.27/arch/powerpc/platforms/ps3/ |
H A D | system-bus.c | 350 struct ps3_system_bus_driver *drv = ps3_drv_to_system_bus_drv(_drv); ps3_system_bus_match() local 354 result = dev->match_id == drv->match_id; ps3_system_bus_match() 356 result = dev->match_sub_id == drv->match_sub_id && ps3_system_bus_match() 357 dev->match_id == drv->match_id; ps3_system_bus_match() 360 pr_info("%s:%d: dev=%u.%u(%s), drv=%u.%u(%s): match\n", ps3_system_bus_match() 363 drv->match_id, drv->match_sub_id, drv->core.name); ps3_system_bus_match() 365 pr_debug("%s:%d: dev=%u.%u(%s), drv=%u.%u(%s): miss\n", ps3_system_bus_match() 368 drv->match_id, drv->match_sub_id, drv->core.name); ps3_system_bus_match() 377 struct ps3_system_bus_driver *drv; ps3_system_bus_probe() local 382 drv = ps3_system_bus_dev_to_system_bus_drv(dev); ps3_system_bus_probe() 383 BUG_ON(!drv); ps3_system_bus_probe() 385 if (drv->probe) ps3_system_bus_probe() 386 result = drv->probe(dev); ps3_system_bus_probe() 399 struct ps3_system_bus_driver *drv; ps3_system_bus_remove() local 404 drv = ps3_system_bus_dev_to_system_bus_drv(dev); ps3_system_bus_remove() 405 BUG_ON(!drv); ps3_system_bus_remove() 407 if (drv->remove) ps3_system_bus_remove() 408 result = drv->remove(dev); ps3_system_bus_remove() 411 __func__, __LINE__, drv->core.name); ps3_system_bus_remove() 420 struct ps3_system_bus_driver *drv; ps3_system_bus_shutdown() local 433 drv = ps3_system_bus_dev_to_system_bus_drv(dev); ps3_system_bus_shutdown() 435 BUG_ON(!drv); ps3_system_bus_shutdown() 438 dev_name(&dev->core), drv->core.name); ps3_system_bus_shutdown() 440 if (drv->shutdown) ps3_system_bus_shutdown() 441 drv->shutdown(dev); ps3_system_bus_shutdown() 442 else if (drv->remove) { ps3_system_bus_shutdown() 444 __func__, __LINE__, drv->core.name); ps3_system_bus_shutdown() 445 drv->remove(dev); ps3_system_bus_shutdown() 448 __func__, __LINE__, drv->core.name); ps3_system_bus_shutdown() 788 int ps3_system_bus_driver_register(struct ps3_system_bus_driver *drv) ps3_system_bus_driver_register() argument 792 pr_debug(" -> %s:%d: %s\n", __func__, __LINE__, drv->core.name); ps3_system_bus_driver_register() 797 drv->core.bus = &ps3_system_bus_type; ps3_system_bus_driver_register() 799 result = driver_register(&drv->core); ps3_system_bus_driver_register() 800 pr_debug(" <- %s:%d: %s\n", __func__, __LINE__, drv->core.name); ps3_system_bus_driver_register() 806 void ps3_system_bus_driver_unregister(struct ps3_system_bus_driver *drv) ps3_system_bus_driver_unregister() argument 808 pr_debug(" -> %s:%d: %s\n", __func__, __LINE__, drv->core.name); ps3_system_bus_driver_unregister() 809 driver_unregister(&drv->core); ps3_system_bus_driver_unregister() 810 pr_debug(" <- %s:%d: %s\n", __func__, __LINE__, drv->core.name); ps3_system_bus_driver_unregister()
|
/linux-4.1.27/drivers/iommu/ |
H A D | msm_iommu_dev.c | 248 struct msm_iommu_drvdata *drv = NULL; msm_iommu_remove() local 250 drv = platform_get_drvdata(pdev); msm_iommu_remove() 251 if (drv) { msm_iommu_remove() 252 if (drv->clk) { msm_iommu_remove() 253 clk_unprepare(drv->clk); msm_iommu_remove() 254 clk_put(drv->clk); msm_iommu_remove() 256 clk_unprepare(drv->pclk); msm_iommu_remove() 257 clk_put(drv->pclk); msm_iommu_remove() 258 memset(drv, 0, sizeof(*drv)); msm_iommu_remove() 259 kfree(drv); msm_iommu_remove() 337 struct msm_iommu_ctx_drvdata *drv = NULL; msm_iommu_ctx_remove() local 338 drv = platform_get_drvdata(pdev); msm_iommu_ctx_remove() 339 if (drv) { msm_iommu_ctx_remove() 340 memset(drv, 0, sizeof(struct msm_iommu_ctx_drvdata)); msm_iommu_ctx_remove() 341 kfree(drv); msm_iommu_ctx_remove()
|
/linux-4.1.27/arch/mips/include/asm/ |
H A D | idle.h | 18 struct cpuidle_driver *drv, int index);
|
H A D | gio_device.h | 32 #define to_gio_driver(drv) container_of(drv, struct gio_driver, driver)
|
H A D | cdmm.h | 32 * @drv: Driver model driver object. 43 struct device_driver drv; member in struct:mips_cdmm_driver
|
/linux-4.1.27/drivers/uwb/ |
H A D | Makefile | 31 umc-drv.o
|
/linux-4.1.27/sound/pci/hda/ |
H A D | hda_bind.c | 20 static int hda_codec_match(struct hdac_device *dev, struct hdac_driver *drv) hda_codec_match() argument 24 container_of(drv, struct hda_codec_driver, core); hda_codec_match() 134 int __hda_codec_driver_register(struct hda_codec_driver *drv, const char *name, __hda_codec_driver_register() argument 137 drv->core.driver.name = name; __hda_codec_driver_register() 138 drv->core.driver.owner = owner; __hda_codec_driver_register() 139 drv->core.driver.bus = &snd_hda_bus_type; __hda_codec_driver_register() 140 drv->core.driver.probe = hda_codec_driver_probe; __hda_codec_driver_register() 141 drv->core.driver.remove = hda_codec_driver_remove; __hda_codec_driver_register() 142 drv->core.driver.shutdown = hda_codec_driver_shutdown; __hda_codec_driver_register() 143 drv->core.driver.pm = &hda_codec_driver_pm; __hda_codec_driver_register() 144 drv->core.type = HDA_DEV_LEGACY; __hda_codec_driver_register() 145 drv->core.match = hda_codec_match; __hda_codec_driver_register() 146 drv->core.unsol_event = hda_codec_unsol_event; __hda_codec_driver_register() 147 return driver_register(&drv->core.driver); __hda_codec_driver_register() 151 void hda_codec_driver_unregister(struct hda_codec_driver *drv) hda_codec_driver_unregister() argument 153 driver_unregister(&drv->core.driver); hda_codec_driver_unregister()
|
/linux-4.1.27/net/core/ |
H A D | timestamping.c | 29 skb->dev->phydev->drv)) classify() 49 if (likely(phydev->drv->txtstamp)) { skb_clone_tx_timestamp() 53 phydev->drv->txtstamp(phydev, clone, type); skb_clone_tx_timestamp() 75 if (likely(phydev->drv->rxtstamp)) skb_defer_rx_timestamp() 76 return phydev->drv->rxtstamp(phydev, skb, type); skb_defer_rx_timestamp()
|
/linux-4.1.27/drivers/isdn/i4l/ |
H A D | isdn_common.c | 72 isdn_lock_driver(isdn_driver_t *drv) isdn_lock_driver() argument 74 try_module_get(drv->interface->owner); isdn_lock_driver() 75 drv->locks++; isdn_lock_driver() 84 if (!dev->drv[i]) isdn_lock_drivers() 86 isdn_lock_driver(dev->drv[i]); isdn_lock_drivers() 91 isdn_unlock_driver(isdn_driver_t *drv) isdn_unlock_driver() argument 93 if (drv->locks > 0) { isdn_unlock_driver() 94 drv->locks--; isdn_unlock_driver() 95 module_put(drv->interface->owner); isdn_unlock_driver() 105 if (!dev->drv[i]) isdn_unlock_drivers() 107 isdn_unlock_driver(dev->drv[i]); isdn_unlock_drivers() 325 wake_up_interruptible(&dev->drv[di]->rcv_waitq[channel]); isdn_receive_skb_callback() 343 if (!dev->drv[cmd->driver]) { isdn_command() 344 printk(KERN_WARNING "isdn_command command(%x) dev->drv[%d] NULL\n", isdn_command() 348 if (!dev->drv[cmd->driver]->interface) { isdn_command() 349 printk(KERN_WARNING "isdn_command command(%x) dev->drv[%d]->interface NULL\n", isdn_command() 356 unsigned long features = (dev->drv[cmd->driver]->interface->features isdn_command() 377 return dev->drv[cmd->driver]->interface->command(cmd); isdn_command() 437 wake_up_interruptible(&dev->drv[di]->snd_waitq[c->arg]); isdn_status_callback() 440 dev->drv[di]->stavail += c->arg; isdn_status_callback() 441 wake_up_interruptible(&dev->drv[di]->st_waitq); isdn_status_callback() 444 dev->drv[di]->flags |= DRV_FLAG_RUNNING; isdn_status_callback() 451 dev->drv[di]->flags &= ~DRV_FLAG_RUNNING; isdn_status_callback() 482 if ((!retval) && (dev->drv[di]->flags & DRV_FLAG_REJBUS)) { isdn_status_callback() 595 dev->drv[di]->online &= ~(1 << (c->arg)); isdn_status_callback() 618 dev->drv[di]->online |= (1 << (c->arg)); isdn_status_callback() 634 dev->drv[di]->online &= ~(1 << (c->arg)); isdn_status_callback() 660 if (isdn_add_channels(dev->drv[di], di, c->arg, 1)) { isdn_status_callback() 686 while (dev->drv[di]->locks > 0) { isdn_status_callback() 687 isdn_unlock_driver(dev->drv[di]); isdn_status_callback() 698 dev->channels -= dev->drv[di]->channels; isdn_status_callback() 699 kfree(dev->drv[di]->rcverr); isdn_status_callback() 700 kfree(dev->drv[di]->rcvcount); isdn_status_callback() 701 for (i = 0; i < dev->drv[di]->channels; i++) isdn_status_callback() 702 skb_queue_purge(&dev->drv[di]->rpqueue[i]); isdn_status_callback() 703 kfree(dev->drv[di]->rpqueue); isdn_status_callback() 704 kfree(dev->drv[di]->rcv_waitq); isdn_status_callback() 705 kfree(dev->drv[di]); isdn_status_callback() 706 dev->drv[di] = NULL; isdn_status_callback() 776 if (!dev->drv[di]) isdn_readbchan() 778 if (skb_queue_empty(&dev->drv[di]->rpqueue[channel])) { isdn_readbchan() 781 !skb_queue_empty(&dev->drv[di]->rpqueue[channel])); isdn_readbchan() 785 if (len > dev->drv[di]->rcvcount[channel]) isdn_readbchan() 786 len = dev->drv[di]->rcvcount[channel]; isdn_readbchan() 790 if (!(skb = skb_peek(&dev->drv[di]->rpqueue[channel]))) isdn_readbchan() 796 if ((ISDN_AUDIO_SKB_DLECOUNT(skb)) || (dev->drv[di]->DLEflag & (1 << channel))) { isdn_readbchan() 804 if (dev->drv[di]->DLEflag & DLEmask) { isdn_readbchan() 806 dev->drv[di]->DLEflag &= ~DLEmask; isdn_readbchan() 810 dev->drv[di]->DLEflag |= DLEmask; isdn_readbchan() 849 skb = skb_dequeue(&dev->drv[di]->rpqueue[channel]); isdn_readbchan() 861 dev->drv[di]->rcvcount[channel] -= count_put; isdn_readbchan() 890 if (!dev->drv[di]) isdn_readbchan_tty() 892 if (skb_queue_empty(&dev->drv[di]->rpqueue[channel])) isdn_readbchan_tty() 895 len = tty_buffer_request_room(port, dev->drv[di]->rcvcount[channel]); isdn_readbchan_tty() 901 if (!(skb = skb_peek(&dev->drv[di]->rpqueue[channel]))) isdn_readbchan_tty() 907 if ((ISDN_AUDIO_SKB_DLECOUNT(skb)) || (dev->drv[di]->DLEflag & (1 << channel))) { isdn_readbchan_tty() 918 if (dev->drv[di]->DLEflag & DLEmask) { isdn_readbchan_tty() 920 dev->drv[di]->DLEflag &= ~DLEmask; isdn_readbchan_tty() 924 dev->drv[di]->DLEflag |= DLEmask; isdn_readbchan_tty() 962 skb = skb_dequeue(&dev->drv[di]->rpqueue[channel]); isdn_readbchan_tty() 975 dev->drv[di]->rcvcount[channel] -= count_put; isdn_readbchan_tty() 1027 if (dev->drv[i]) { isdn_statstr() 1028 sprintf(p, "%ld ", dev->drv[i]->online); isdn_statstr() 1104 if (!(dev->drv[drvidx]->flags & DRV_FLAG_RUNNING)) { isdn_read() 1114 &dev->drv[drvidx]->rcv_waitq[chidx]); isdn_read() 1128 if (!dev->drv[drvidx]->stavail) { isdn_read() 1133 wait_event_interruptible(dev->drv[drvidx]->st_waitq, isdn_read() 1134 dev->drv[drvidx]->stavail); isdn_read() 1136 if (dev->drv[drvidx]->interface->readstat) { isdn_read() 1137 if (count > dev->drv[drvidx]->stavail) isdn_read() 1138 count = dev->drv[drvidx]->stavail; isdn_read() 1139 len = dev->drv[drvidx]->interface->readstat(buf, count, isdn_read() 1149 dev->drv[drvidx]->stavail -= len; isdn_read() 1151 dev->drv[drvidx]->stavail = 0; isdn_read() 1189 if (!(dev->drv[drvidx]->flags & DRV_FLAG_RUNNING)) { isdn_write() 1194 wait_event_interruptible(dev->drv[drvidx]->snd_waitq[chidx], isdn_write() 1207 if (!(dev->drv[drvidx]->flags & DRV_FLAG_RUNNING)) isdn_write() 1210 if (dev->drv[drvidx]->interface->writecmd) isdn_write() 1211 retval = dev->drv[drvidx]->interface-> isdn_write() 1252 poll_wait(file, &(dev->drv[drvidx]->st_waitq), wait); isdn_poll() 1254 if (dev->drv[drvidx]->stavail) { isdn_poll() 1337 if (!(dev->drv[drvidx]->flags & DRV_FLAG_RUNNING)) isdn_ioctl() 1529 dev->drv[drvidx]->flags |= DRV_FLAG_REJBUS; isdn_ioctl() 1531 dev->drv[drvidx]->flags &= ~DRV_FLAG_REJBUS; isdn_ioctl() 1629 strcpy(dev->drv[drvidx]->msn2eaz[i], bname); isdn_ioctl() 1645 strlen(dev->drv[drvidx]->msn2eaz[i]) ? isdn_ioctl() 1646 dev->drv[drvidx]->msn2eaz[i] : "_", isdn_ioctl() 1765 if (!(dev->drv[drvidx]->flags & DRV_FLAG_RUNNING)) isdn_open() 1767 if (!(dev->drv[drvidx]->online & (1 << chidx))) isdn_open() 1853 isdn_driver_t *this = dev->drv[di]; isdn_map_eaz2msn() 1900 if (dev->drv[d]->flags & DRV_FLAG_RUNNING) { isdn_get_free_channel() 1901 if (((dev->drv[d]->interface->features & features) == features) || isdn_get_free_channel() 1902 (((dev->drv[d]->interface->features & vfeatures) == vfeatures) && isdn_get_free_channel() 1903 (dev->drv[d]->interface->features & ISDN_FEATURE_L2_TRANS))) { isdn_get_free_channel() 1932 printk(KERN_WARNING "%s: called with invalid drv(%d) or channel(%d)\n", isdn_free_channel() 1951 if (dev->drv[di]) isdn_free_channel() 1952 skb_queue_purge(&dev->drv[di]->rpqueue[ch]); isdn_free_channel() 1980 int hl = dev->drv[drvidx]->interface->hl_hdrlen; isdn_writebuf_stub() 1990 ret = dev->drv[drvidx]->interface->writebuf_skb(drvidx, chan, 1, skb); isdn_writebuf_stub() 2023 ret = dev->drv[drvidx]->interface->writebuf_skb(drvidx, chan, ack, nskb); isdn_writebuf_skb_stub() 2025 int hl = dev->drv[drvidx]->interface->hl_hdrlen; isdn_writebuf_skb_stub() 2041 ret = dev->drv[drvidx]->interface->writebuf_skb(drvidx, chan, ack, skb_tmp); isdn_writebuf_skb_stub() 2048 ret = dev->drv[drvidx]->interface->writebuf_skb(drvidx, chan, ack, skb); isdn_writebuf_skb_stub() 2162 if (!dev->drv[drvidx]) set_global_features() 2164 if (dev->drv[drvidx]->interface) set_global_features() 2165 dev->global_features |= dev->drv[drvidx]->interface->features; set_global_features() 2256 if (!dev->drv[drvidx]) register_isdn() 2271 dev->drv[drvidx] = d; register_isdn()
|
/linux-4.1.27/drivers/bcma/ |
H A D | main.c | 25 static int bcma_bus_match(struct device *dev, struct device_driver *drv); 539 struct device_driver *drv = core->dev.driver; bcma_bus_suspend() local 540 if (drv) { bcma_bus_suspend() 541 struct bcma_driver *adrv = container_of(drv, struct bcma_driver, drv); bcma_bus_suspend() 560 struct device_driver *drv = core->dev.driver; bcma_bus_resume() local 561 if (drv) { bcma_bus_resume() 562 struct bcma_driver *adrv = container_of(drv, struct bcma_driver, drv); bcma_bus_resume() 572 int __bcma_driver_register(struct bcma_driver *drv, struct module *owner) __bcma_driver_register() argument 574 drv->drv.name = drv->name; __bcma_driver_register() 575 drv->drv.bus = &bcma_bus_type; __bcma_driver_register() 576 drv->drv.owner = owner; __bcma_driver_register() 578 return driver_register(&drv->drv); __bcma_driver_register() 582 void bcma_driver_unregister(struct bcma_driver *drv) bcma_driver_unregister() argument 584 driver_unregister(&drv->drv); bcma_driver_unregister() 588 static int bcma_bus_match(struct device *dev, struct device_driver *drv) bcma_bus_match() argument 591 struct bcma_driver *adrv = container_of(drv, struct bcma_driver, drv); bcma_bus_match() 609 drv); bcma_device_probe() 622 drv); bcma_device_remove()
|
/linux-4.1.27/sound/soc/intel/atom/ |
H A D | sst-atom-controls.c | 31 static int sst_fill_byte_control(struct sst_data *drv, sst_fill_byte_control() argument 36 struct snd_sst_bytes_v2 *byte_data = drv->byte_stream; sst_fill_byte_control() 45 dev_err(&drv->pdev->dev, "command length too big (%u)", len); sst_fill_byte_control() 55 static int sst_fill_and_send_cmd_unlocked(struct sst_data *drv, sst_fill_and_send_cmd_unlocked() argument 61 ret = sst_fill_byte_control(drv, ipc_msg, sst_fill_and_send_cmd_unlocked() 65 return sst->ops->send_byte_stream(sst->dev, drv->byte_stream); sst_fill_and_send_cmd_unlocked() 73 static int sst_fill_and_send_cmd(struct sst_data *drv, sst_fill_and_send_cmd() argument 79 mutex_lock(&drv->lock); sst_fill_and_send_cmd() 80 ret = sst_fill_and_send_cmd_unlocked(drv, ipc_msg, block, sst_fill_and_send_cmd() 82 mutex_unlock(&drv->lock); sst_fill_and_send_cmd() 113 static int sst_send_slot_map(struct sst_data *drv) sst_send_slot_map() argument 130 return sst_fill_and_send_cmd_unlocked(drv, SST_IPC_IA_SET_PARAMS, sst_send_slot_map() 164 struct sst_data *drv = snd_soc_component_get_drvdata(c); sst_slot_get() local 170 mutex_lock(&drv->lock); sst_slot_get() 178 mutex_unlock(&drv->lock); sst_slot_get() 191 static int sst_check_and_send_slot_map(struct sst_data *drv, struct snd_kcontrol *kcontrol) sst_check_and_send_slot_map() argument 197 ret = sst_send_slot_map(drv); sst_check_and_send_slot_map() 199 dev_err(&drv->pdev->dev, "Slot control: %s doesn't have DAPM widget!!!\n", sst_check_and_send_slot_map() 221 struct sst_data *drv = snd_soc_component_get_drvdata(c); sst_slot_put() local 237 mutex_lock(&drv->lock); sst_slot_put() 244 ret = sst_check_and_send_slot_map(drv, kcontrol); sst_slot_put() 246 mutex_unlock(&drv->lock); sst_slot_put() 258 ret = sst_check_and_send_slot_map(drv, kcontrol); sst_slot_put() 260 mutex_unlock(&drv->lock); sst_slot_put() 264 static int sst_send_algo_cmd(struct sst_data *drv, sst_send_algo_cmd() argument 281 ret = sst_fill_and_send_cmd_unlocked(drv, SST_IPC_IA_SET_PARAMS, sst_send_algo_cmd() 294 static int sst_find_and_send_pipe_algo(struct sst_data *drv, sst_find_and_send_pipe_algo() argument 301 dev_dbg(&drv->pdev->dev, "Enter: widget=%s\n", pipe); sst_find_and_send_pipe_algo() 306 dev_dbg(&drv->pdev->dev, "Found algo control name=%s pipe=%s\n", sst_find_and_send_pipe_algo() 308 ret = sst_send_algo_cmd(drv, bc); sst_find_and_send_pipe_algo() 350 struct sst_data *drv = snd_soc_component_get_drvdata(cmpnt); sst_algo_control_set() local 354 mutex_lock(&drv->lock); sst_algo_control_set() 360 mutex_unlock(&drv->lock); sst_algo_control_set() 367 ret = sst_send_algo_cmd(drv, bc); sst_algo_control_set() 368 mutex_unlock(&drv->lock); sst_algo_control_set() 400 static int sst_send_gain_cmd(struct sst_data *drv, struct sst_gain_value *gv, sst_send_gain_cmd() argument 405 dev_dbg(&drv->pdev->dev, "Enter\n"); sst_send_gain_cmd() 427 return sst_fill_and_send_cmd_unlocked(drv, SST_IPC_IA_SET_PARAMS, sst_send_gain_cmd() 467 struct sst_data *drv = snd_soc_component_get_drvdata(cmpnt); sst_gain_put() local 471 mutex_lock(&drv->lock); sst_gain_put() 493 mutex_unlock(&drv->lock); sst_gain_put() 500 ret = sst_send_gain_cmd(drv, gv, mc->task_id, sst_gain_put() 502 mutex_unlock(&drv->lock); sst_gain_put() 508 struct sst_data *drv, int mute); 514 struct sst_data *drv = snd_soc_component_get_drvdata(c); sst_send_pipe_module_params() local 517 mutex_lock(&drv->lock); sst_send_pipe_module_params() 518 sst_find_and_send_pipe_algo(drv, w->name, ids); sst_send_pipe_module_params() 519 sst_set_pipe_gain(ids, drv, 0); sst_send_pipe_module_params() 520 mutex_unlock(&drv->lock); sst_send_pipe_module_params() 589 struct sst_data *drv, int mute) sst_set_pipe_gain() 599 dev_dbg(&drv->pdev->dev, "control name=%s\n", kctl->id.name); sst_set_pipe_gain() 603 ret = sst_send_gain_cmd(drv, gv, mc->task_id, sst_set_pipe_gain() 616 struct sst_data *drv = snd_soc_component_get_drvdata(cmpnt); sst_swm_mixer_event() local 669 return sst_fill_and_send_cmd(drv, SST_IPC_IA_CMD, SST_FLAG_BLOCKED, sst_swm_mixer_event() 732 struct sst_data *drv = snd_soc_dai_get_drvdata(dai); sst_handle_vb_timer() local 750 mutex_lock(&drv->lock); sst_handle_vb_timer() 762 ret = sst_fill_and_send_cmd_unlocked(drv, SST_IPC_IA_CMD, sst_handle_vb_timer() 770 mutex_unlock(&drv->lock); sst_handle_vb_timer() 797 struct sst_data *drv = snd_soc_dai_get_drvdata(dai); send_ssp_cmd() local 830 return sst_fill_and_send_cmd(drv, SST_IPC_IA_CMD, SST_FLAG_BLOCKED, send_ssp_cmd() 840 struct sst_data *drv = snd_soc_component_get_drvdata(c); sst_set_be_modules() local 845 ret = sst_send_slot_map(drv); sst_set_be_modules() 859 struct sst_data *drv = snd_soc_component_get_drvdata(c); sst_set_media_path() local 879 ret = sst_fill_and_send_cmd(drv, SST_IPC_IA_CMD, SST_FLAG_BLOCKED, sst_set_media_path() 896 struct sst_data *drv = snd_soc_component_get_drvdata(c); sst_set_media_loop() local 917 ret = sst_fill_and_send_cmd(drv, SST_IPC_IA_CMD, SST_FLAG_BLOCKED, sst_set_media_loop() 1170 struct sst_data *drv = snd_soc_dai_get_drvdata(dai); sst_send_pipe_gains() local 1190 mutex_lock(&drv->lock); sst_send_pipe_gains() 1191 sst_set_pipe_gain(ids, drv, mute); sst_send_pipe_gains() 1192 mutex_unlock(&drv->lock); sst_send_pipe_gains() 1209 mutex_lock(&drv->lock); sst_send_pipe_gains() 1210 sst_set_pipe_gain(ids, drv, mute); sst_send_pipe_gains() 1211 mutex_unlock(&drv->lock); sst_send_pipe_gains() 1379 struct sst_data *drv = snd_soc_platform_get_drvdata(platform); sst_dsp_init_v2_dpcm() local 1382 drv->byte_stream = devm_kzalloc(platform->dev, sst_dsp_init_v2_dpcm() 1384 if (!drv->byte_stream) sst_dsp_init_v2_dpcm() 588 sst_set_pipe_gain(struct sst_ids *ids, struct sst_data *drv, int mute) sst_set_pipe_gain() argument
|
H A D | sst-mfld-platform-pcm.c | 670 struct sst_data *drv = dev_get_drvdata(platform->dev); sst_soc_probe() local 672 drv->soc_card = platform->component.card; sst_soc_probe() 690 struct sst_data *drv; sst_platform_probe() local 694 drv = devm_kzalloc(&pdev->dev, sizeof(*drv), GFP_KERNEL); sst_platform_probe() 695 if (drv == NULL) { sst_platform_probe() 706 drv->pdata = pdata; sst_platform_probe() 707 drv->pdev = pdev; sst_platform_probe() 708 mutex_init(&drv->lock); sst_platform_probe() 709 dev_set_drvdata(&pdev->dev, drv); sst_platform_probe() 739 struct sst_data *drv = dev_get_drvdata(dev); sst_soc_prepare() local 743 snd_soc_suspend(drv->soc_card->dev); sst_soc_prepare() 744 snd_soc_poweroff(drv->soc_card->dev); sst_soc_prepare() 747 for (i = 0; i < drv->soc_card->num_rtd; i++) { sst_soc_prepare() 748 struct snd_soc_dai *dai = drv->soc_card->rtd[i].cpu_dai; sst_soc_prepare() 761 struct sst_data *drv = dev_get_drvdata(dev); sst_soc_complete() local 765 for (i = 0; i < drv->soc_card->num_rtd; i++) { sst_soc_complete() 766 struct snd_soc_dai *dai = drv->soc_card->rtd[i].cpu_dai; sst_soc_complete() 773 snd_soc_resume(drv->soc_card->dev); sst_soc_complete()
|
/linux-4.1.27/drivers/xen/xenbus/ |
H A D | xenbus_probe_frontend.c | 186 struct device_driver *drv = data; is_device_connecting() local 197 if (drv && (dev->driver != drv)) is_device_connecting() 226 static int exists_essential_connecting_device(struct device_driver *drv) exists_essential_connecting_device() argument 228 return bus_for_each_dev(&xenbus_frontend.bus, NULL, drv, exists_essential_connecting_device() 231 static int exists_non_essential_connecting_device(struct device_driver *drv) exists_non_essential_connecting_device() argument 233 return bus_for_each_dev(&xenbus_frontend.bus, NULL, drv, exists_non_essential_connecting_device() 240 struct device_driver *drv = data; print_device_status() local 243 if (drv && (dev->driver != drv)) print_device_status() 298 struct device_driver *drv = xendrv ? &xendrv->driver : NULL; wait_for_devices() local 304 while (exists_non_essential_connecting_device(drv)) wait_for_devices() 309 while (exists_essential_connecting_device(drv)) wait_for_devices() 316 bus_for_each_dev(&xenbus_frontend.bus, NULL, drv, wait_for_devices() 320 int __xenbus_register_frontend(struct xenbus_driver *drv, struct module *owner, __xenbus_register_frontend() argument 325 drv->read_otherend_details = read_backend_details; __xenbus_register_frontend() 327 ret = xenbus_register_driver_common(drv, &xenbus_frontend, __xenbus_register_frontend() 333 wait_for_devices(drv); __xenbus_register_frontend()
|
H A D | xenbus_probe.c | 95 struct xenbus_driver *drv = to_xenbus_driver(_drv); xenbus_match() local 97 if (!drv->ids) xenbus_match() 100 return match_device(drv->ids, to_xenbus_device(_dev)) != NULL; xenbus_match() 124 struct xenbus_driver *drv = to_xenbus_driver(dev->dev.driver); talk_to_otherend() local 129 return drv->read_otherend_details(dev); talk_to_otherend() 178 struct xenbus_driver *drv = to_xenbus_driver(dev->dev.driver); xenbus_otherend_changed() local 207 if (drv->otherend_changed) xenbus_otherend_changed() 208 drv->otherend_changed(dev, state); xenbus_otherend_changed() 215 struct xenbus_driver *drv = to_xenbus_driver(_dev->driver); xenbus_dev_probe() local 221 if (!drv->probe) { xenbus_dev_probe() 226 id = match_device(drv->ids, dev); xenbus_dev_probe() 239 err = drv->probe(dev, id); xenbus_dev_probe() 261 struct xenbus_driver *drv = to_xenbus_driver(_dev->driver); xenbus_dev_remove() local 267 if (drv->remove) xenbus_dev_remove() 268 drv->remove(dev); xenbus_dev_remove() 300 int xenbus_register_driver_common(struct xenbus_driver *drv, xenbus_register_driver_common() argument 304 drv->driver.name = drv->name ? drv->name : drv->ids[0].devicetype; xenbus_register_driver_common() 305 drv->driver.bus = &bus->bus; xenbus_register_driver_common() 306 drv->driver.owner = owner; xenbus_register_driver_common() 307 drv->driver.mod_name = mod_name; xenbus_register_driver_common() 309 return driver_register(&drv->driver); xenbus_register_driver_common() 313 void xenbus_unregister_driver(struct xenbus_driver *drv) xenbus_unregister_driver() argument 315 driver_unregister(&drv->driver); xenbus_unregister_driver() 589 struct xenbus_driver *drv; xenbus_dev_suspend() local 597 drv = to_xenbus_driver(dev->driver); xenbus_dev_suspend() 598 if (drv->suspend) xenbus_dev_suspend() 599 err = drv->suspend(xdev); xenbus_dev_suspend() 609 struct xenbus_driver *drv; xenbus_dev_resume() local 617 drv = to_xenbus_driver(dev->driver); xenbus_dev_resume() 627 if (drv->resume) { xenbus_dev_resume() 628 err = drv->resume(xdev); xenbus_dev_resume()
|
H A D | xenbus_probe_backend.c | 100 struct xenbus_driver *drv; xenbus_uevent_backend() local 125 drv = to_xenbus_driver(dev->driver); xenbus_uevent_backend() 126 if (drv && drv->uevent) xenbus_uevent_backend() 127 return drv->uevent(xdev, env); xenbus_uevent_backend() 237 int __xenbus_register_backend(struct xenbus_driver *drv, struct module *owner, __xenbus_register_backend() argument 240 drv->read_otherend_details = read_frontend_details; __xenbus_register_backend() 242 return xenbus_register_driver_common(drv, &xenbus_backend, __xenbus_register_backend()
|
/linux-4.1.27/sound/core/seq/ |
H A D | seq_midi_emul.c | 47 static void note_off(struct snd_midi_op *ops, void *drv, 54 static void rpn(struct snd_midi_op *ops, void *drv, struct snd_midi_channel *chan, 56 static void nrpn(struct snd_midi_op *ops, void *drv, struct snd_midi_channel *chan, 88 void *drv; snd_midi_process_event() local 108 drv = chanset->private_data; snd_midi_process_event() 131 ops->note_off(drv, ev->data.note.note, 0, chan); snd_midi_process_event() 135 ops->note_on(drv, ev->data.note.note, ev->data.note.velocity, chan); snd_midi_process_event() 141 note_off(ops, drv, chan, ev->data.note.note, ev->data.note.velocity); snd_midi_process_event() 145 ops->key_press(drv, ev->data.note.note, ev->data.note.velocity, chan); snd_midi_process_event() 148 do_control(ops, drv, chanset, chan, snd_midi_process_event() 157 ops->control(drv, MIDI_CTL_PITCHBEND, chan); snd_midi_process_event() 162 ops->control(drv, MIDI_CTL_CHAN_PRESSURE, chan); snd_midi_process_event() 170 do_control(ops, drv, chanset, chan, snd_midi_process_event() 174 do_control(ops, drv, chanset, chan, snd_midi_process_event() 189 nrpn(ops, drv, chan, chanset); snd_midi_process_event() 202 rpn(ops, drv, chan, chanset); snd_midi_process_event() 210 sysex(ops, drv, sysexbuf, len, chanset); snd_midi_process_event() 245 note_off(struct snd_midi_op *ops, void *drv, struct snd_midi_channel *chan, note_off() argument 258 ops->note_off(drv, note, vel, chan); note_off() 267 do_control(struct snd_midi_op *ops, void *drv, struct snd_midi_channel_set *chset, do_control() argument 290 ops->note_off(drv, i, 0, chan); do_control() 312 ops->note_off(drv, i, 0, chan); do_control() 323 rpn(ops, drv, chan, chset); do_control() 325 nrpn(ops, drv, chan, chset); do_control() 337 all_sounds_off(ops, drv, chan); do_control() 341 all_notes_off(ops, drv, chan); do_control() 376 ops->control(drv, control, chan); do_control() 417 rpn(struct snd_midi_op *ops, void *drv, struct snd_midi_channel *chan, rpn() argument 457 nrpn(struct snd_midi_op *ops, void *drv, struct snd_midi_channel *chan, nrpn() argument 462 ops->nrpn(drv, chan, chset); nrpn() 599 all_sounds_off(struct snd_midi_op *ops, void *drv, struct snd_midi_channel *chan) all_sounds_off() argument 607 ops->note_terminate(drv, n, chan); all_sounds_off() 617 all_notes_off(struct snd_midi_op *ops, void *drv, struct snd_midi_channel *chan) all_notes_off() argument 625 note_off(ops, drv, chan, n, 0); all_notes_off()
|
H A D | seq_device.c | 58 static int snd_seq_bus_match(struct device *dev, struct device_driver *drv) snd_seq_bus_match() argument 61 struct snd_seq_driver *sdrv = to_seq_drv(drv); snd_seq_bus_match() 253 int __snd_seq_driver_register(struct snd_seq_driver *drv, struct module *mod) __snd_seq_driver_register() argument 255 if (WARN_ON(!drv->driver.name || !drv->id)) __snd_seq_driver_register() 257 drv->driver.bus = &snd_seq_bus_type; __snd_seq_driver_register() 258 drv->driver.owner = mod; __snd_seq_driver_register() 259 return driver_register(&drv->driver); __snd_seq_driver_register() 263 void snd_seq_driver_unregister(struct snd_seq_driver *drv) snd_seq_driver_unregister() argument 265 driver_unregister(&drv->driver); snd_seq_driver_unregister()
|
/linux-4.1.27/drivers/mcb/ |
H A D | mcb-core.c | 34 static int mcb_match(struct device *dev, struct device_driver *drv) mcb_match() argument 36 struct mcb_driver *mdrv = to_mcb_driver(drv); mcb_match() 104 * @drv: The @mcb_driver 111 int __mcb_register_driver(struct mcb_driver *drv, struct module *owner, __mcb_register_driver() argument 114 if (!drv->probe || !drv->remove) __mcb_register_driver() 117 drv->driver.owner = owner; __mcb_register_driver() 118 drv->driver.bus = &mcb_bus_type; __mcb_register_driver() 119 drv->driver.mod_name = mod_name; __mcb_register_driver() 121 return driver_register(&drv->driver); __mcb_register_driver() 127 * @drv: The @mcb_driver 131 void mcb_unregister_driver(struct mcb_driver *drv) mcb_unregister_driver() argument 133 driver_unregister(&drv->driver); mcb_unregister_driver()
|
/linux-4.1.27/drivers/net/ethernet/qlogic/qlge/ |
H A D | qlge_mpi.c | 138 netif_err(qdev, drv, qdev->ndev, "Failed mailbox read.\n"); ql_get_mb_sts() 211 netif_err(qdev, drv, qdev->ndev, "Enter!\n"); ql_idc_req_aen() 219 netif_err(qdev, drv, qdev->ndev, ql_idc_req_aen() 243 netif_err(qdev, drv, qdev->ndev, ql_idc_cmplt_aen() 262 netif_err(qdev, drv, qdev->ndev, ql_link_up() 268 netif_err(qdev, drv, qdev->ndev, "Link Up.\n"); ql_link_up() 288 netif_err(qdev, drv, qdev->ndev, "Queue Port Config Worker!\n"); ql_link_up() 310 netif_err(qdev, drv, qdev->ndev, "Link down AEN broken!\n"); ql_link_down() 323 netif_err(qdev, drv, qdev->ndev, "SFP in AEN broken!\n"); ql_sfp_in() 325 netif_err(qdev, drv, qdev->ndev, "SFP insertion detected.\n"); ql_sfp_in() 338 netif_err(qdev, drv, qdev->ndev, "SFP out AEN broken!\n"); ql_sfp_out() 340 netif_err(qdev, drv, qdev->ndev, "SFP removal detected.\n"); ql_sfp_out() 353 netif_err(qdev, drv, qdev->ndev, "Lost AEN broken!\n"); ql_aen_lost() 356 netif_err(qdev, drv, qdev->ndev, "Lost AEN detected.\n"); ql_aen_lost() 358 netif_err(qdev, drv, qdev->ndev, "mbox_out[%d] = 0x%.08x.\n", ql_aen_lost() 374 netif_err(qdev, drv, qdev->ndev, "Firmware did not initialize!\n"); ql_init_fw_done() 376 netif_err(qdev, drv, qdev->ndev, "Firmware Revision = 0x%.08x.\n", ql_init_fw_done() 401 netif_err(qdev, drv, qdev->ndev, ql_mpi_handler() 491 netif_err(qdev, drv, qdev->ndev, ql_mpi_handler() 498 netif_err(qdev, drv, qdev->ndev, "System Error.\n"); ql_mpi_handler() 511 netif_err(qdev, drv, qdev->ndev, ql_mpi_handler() 586 netif_err(qdev, drv, qdev->ndev, ql_mailbox_command() 633 netif_err(qdev, drv, qdev->ndev, ql_mb_about_fw() 665 netif_err(qdev, drv, qdev->ndev, ql_mb_get_fw_state() 675 netif_err(qdev, drv, qdev->ndev, ql_mb_get_fw_state() 708 netif_err(qdev, drv, qdev->ndev, "Failed IDC ACK send.\n"); ql_mb_idc_ack() 739 netif_err(qdev, drv, qdev->ndev, ql_mb_set_port_cfg() 742 netif_err(qdev, drv, qdev->ndev, ql_mb_set_port_cfg() 777 netif_err(qdev, drv, qdev->ndev, "Failed to dump risc RAM.\n"); ql_mb_dump_ram() 827 netif_err(qdev, drv, qdev->ndev, ql_mb_get_port_cfg() 831 netif_printk(qdev, drv, KERN_DEBUG, qdev->ndev, ql_mb_get_port_cfg() 859 netif_err(qdev, drv, qdev->ndev, "Failed to set WOL mode.\n"); ql_mb_wol_mode() 901 netif_err(qdev, drv, qdev->ndev, "Failed to set WOL mode.\n"); ql_mb_wol_set_magic() 927 netif_err(qdev, drv, qdev->ndev, "IDC Timeout.\n"); ql_idc_wait() 935 netif_err(qdev, drv, qdev->ndev, ql_idc_wait() 939 netif_err(qdev, drv, qdev->ndev, "IDC Success.\n"); ql_idc_wait() 943 netif_err(qdev, drv, qdev->ndev, ql_idc_wait() 974 netif_err(qdev, drv, qdev->ndev, ql_mb_set_led_cfg() 1000 netif_err(qdev, drv, qdev->ndev, ql_mb_get_led_cfg() 1031 netif_err(qdev, drv, qdev->ndev, ql_mb_set_mgmnt_traffic_ctl() 1039 netif_err(qdev, drv, qdev->ndev, ql_mb_set_mgmnt_traffic_ctl() 1070 netif_err(qdev, drv, qdev->ndev, ql_mb_get_mgmnt_traffic_ctl() 1074 netif_err(qdev, drv, qdev->ndev, ql_mb_get_mgmnt_traffic_ctl() 1127 netif_err(qdev, drv, qdev->ndev, ql_mpi_port_cfg_work() 1141 netif_err(qdev, drv, qdev->ndev, ql_mpi_port_cfg_work() 1173 netif_err(qdev, drv, qdev->ndev, ql_mpi_idc_work() 1189 netif_err(qdev, drv, qdev->ndev, ql_mpi_idc_work() 1192 netif_printk(qdev, drv, KERN_DEBUG, qdev->ndev, ql_mpi_idc_work() 1222 netif_err(qdev, drv, qdev->ndev, ql_mpi_idc_work() 1225 netif_printk(qdev, drv, KERN_DEBUG, qdev->ndev, ql_mpi_idc_work() 1273 netif_err(qdev, drv, qdev->ndev, "Don't own firmware!\n"); ql_mpi_reset_work() 1278 netif_err(qdev, drv, qdev->ndev, "Core is dumped!\n"); ql_mpi_reset_work()
|
/linux-4.1.27/arch/arm/include/asm/ |
H A D | cpuidle.h | 8 struct cpuidle_driver *drv, int index); 11 struct cpuidle_driver *drv, int index) { return -ENODEV; } 10 arm_cpuidle_simple_enter(struct cpuidle_device *dev, struct cpuidle_driver *drv, int index) arm_cpuidle_simple_enter() argument
|
/linux-4.1.27/arch/arm/mach-mmp/include/mach/ |
H A D | mfp.h | 31 #define MFP_CFG_DRV(pin, af, drv) \ 32 (MFP_LPM_FLOAT | MFP_PIN(MFP_PIN_##pin) | MFP_##af | MFP_DRIVE_##drv)
|
/linux-4.1.27/drivers/net/wireless/rt2x00/ |
H A D | rt2800lib.h | 57 const struct rt2800_ops *rt2800ops = rt2x00dev->ops->drv; rt2800_register_read() 66 const struct rt2800_ops *rt2800ops = rt2x00dev->ops->drv; rt2800_register_read_lock() 75 const struct rt2800_ops *rt2800ops = rt2x00dev->ops->drv; rt2800_register_write() 84 const struct rt2800_ops *rt2800ops = rt2x00dev->ops->drv; rt2800_register_write_lock() 93 const struct rt2800_ops *rt2800ops = rt2x00dev->ops->drv; rt2800_register_multiread() 103 const struct rt2800_ops *rt2800ops = rt2x00dev->ops->drv; rt2800_register_multiwrite() 113 const struct rt2800_ops *rt2800ops = rt2x00dev->ops->drv; rt2800_regbusy_read() 120 const struct rt2800_ops *rt2800ops = rt2x00dev->ops->drv; rt2800_read_eeprom() 127 const struct rt2800_ops *rt2800ops = rt2x00dev->ops->drv; rt2800_hwcrypt_disabled() 135 const struct rt2800_ops *rt2800ops = rt2x00dev->ops->drv; rt2800_drv_write_firmware() 142 const struct rt2800_ops *rt2800ops = rt2x00dev->ops->drv; rt2800_drv_init_registers() 149 const struct rt2800_ops *rt2800ops = entry->queue->rt2x00dev->ops->drv; rt2800_drv_get_txwi()
|
/linux-4.1.27/drivers/tc/ |
H A D | tc-driver.c | 21 * @drv: the driver structure to register 36 * @drv: the driver structure to unregister 80 * @drv: the device driver to search for matching TC device ID strings 86 static int tc_bus_match(struct device *dev, struct device_driver *drv) tc_bus_match() argument 89 struct tc_driver *tdrv = to_tc_driver(drv); tc_bus_match()
|
/linux-4.1.27/drivers/block/ |
H A D | cciss.c | 187 drive_info_struct *drv); 439 drive_info_struct *drv = h->drv[*pos]; cciss_seq_show() local 444 if (drv == NULL) /* it's possible for h->drv[] to have holes. */ cciss_seq_show() 447 if (drv->heads == 0) cciss_seq_show() 450 vol_sz = drv->nr_blocks; cciss_seq_show() 455 if (drv->raid_level < 0 || drv->raid_level > RAID_UNKNOWN) cciss_seq_show() 456 drv->raid_level = RAID_UNKNOWN; cciss_seq_show() 460 raid_label[drv->raid_level]); cciss_seq_show() 665 drive_info_struct *drv = to_drv(dev); dev_show_unique_id() local 666 struct ctlr_info *h = to_hba(drv->dev.parent); dev_show_unique_id() 675 memcpy(sn, drv->serial_no, sizeof(sn)); dev_show_unique_id() 695 drive_info_struct *drv = to_drv(dev); dev_show_vendor() local 696 struct ctlr_info *h = to_hba(drv->dev.parent); dev_show_vendor() 705 memcpy(vendor, drv->vendor, VENDOR_LEN + 1); dev_show_vendor() 711 return snprintf(buf, sizeof(vendor) + 1, "%s\n", drv->vendor); dev_show_vendor() 719 drive_info_struct *drv = to_drv(dev); dev_show_model() local 720 struct ctlr_info *h = to_hba(drv->dev.parent); dev_show_model() 729 memcpy(model, drv->model, MODEL_LEN + 1); dev_show_model() 735 return snprintf(buf, sizeof(model) + 1, "%s\n", drv->model); dev_show_model() 743 drive_info_struct *drv = to_drv(dev); dev_show_rev() local 744 struct ctlr_info *h = to_hba(drv->dev.parent); dev_show_rev() 753 memcpy(rev, drv->rev, REV_LEN + 1); dev_show_rev() 759 return snprintf(buf, sizeof(rev) + 1, "%s\n", drv->rev); dev_show_rev() 766 drive_info_struct *drv = to_drv(dev); cciss_show_lunid() local 767 struct ctlr_info *h = to_hba(drv->dev.parent); cciss_show_lunid() 776 if (!drv->heads) { cciss_show_lunid() 780 memcpy(lunid, drv->LunID, sizeof(lunid)); cciss_show_lunid() 791 drive_info_struct *drv = to_drv(dev); cciss_show_raid_level() local 792 struct ctlr_info *h = to_hba(drv->dev.parent); cciss_show_raid_level() 801 raid = drv->raid_level; cciss_show_raid_level() 814 drive_info_struct *drv = to_drv(dev); cciss_show_usage_count() local 815 struct ctlr_info *h = to_hba(drv->dev.parent); cciss_show_usage_count() 824 count = drv->usage_count; cciss_show_usage_count() 920 * of h->drv[x]dev goes to zero. 924 drive_info_struct *drv = to_drv(dev); cciss_device_release() local 925 kfree(drv); cciss_device_release() 939 if (h->drv[drv_index]->device_initialized) cciss_create_ld_sysfs_entry() 942 dev = &h->drv[drv_index]->dev; cciss_create_ld_sysfs_entry() 948 h->drv[drv_index]->device_initialized = 1; cciss_create_ld_sysfs_entry() 958 struct device *dev = &h->drv[drv_index]->dev; cciss_destroy_ld_sysfs_entry() 966 h->drv[drv_index] = NULL; cciss_destroy_ld_sysfs_entry() 1081 drive_info_struct *drv = get_drv(bdev->bd_disk); cciss_open() local 1084 if (drv->busy_configuring) cciss_open() 1094 if (drv->heads == 0) { cciss_open() 1100 } else if (memcmp(drv->LunID, CTLR_LUNID, cciss_open() 1101 sizeof(drv->LunID))) { cciss_open() 1108 drv->usage_count++; cciss_open() 1130 drive_info_struct *drv; cciss_release() local 1134 drv = get_drv(disk); cciss_release() 1136 drv->usage_count--; cciss_release() 1264 drive_info_struct *drv = get_drv(bdev->bd_disk); cciss_getgeo() local 1266 if (!drv->cylinders) cciss_getgeo() 1269 geo->heads = drv->heads; cciss_getgeo() 1270 geo->sectors = drv->sectors; cciss_getgeo() 1271 geo->cylinders = drv->cylinders; cciss_getgeo() 1449 drive_info_struct *drv = get_drv(disk); cciss_getluninfo() local 1453 memcpy(&luninfo.LunID, drv->LunID, sizeof(luninfo.LunID)); cciss_getluninfo() 1454 luninfo.num_opens = drv->usage_count; cciss_getluninfo() 1789 if (!h->drv[curr_queue]) cciss_check_queues() 1791 if (!(h->drv[curr_queue]->queue) || cciss_check_queues() 1792 !(h->drv[curr_queue]->heads)) cciss_check_queues() 1860 memcpy(scsi3addr, h->drv[log_unit]->LunID, log_unit_to_scsi3addr() 1861 sizeof(h->drv[log_unit]->LunID)); log_unit_to_scsi3addr() 1943 disk->private_data = h->drv[drv_index]; cciss_add_disk() 1944 disk->driverfs_dev = &h->drv[drv_index]->dev; cciss_add_disk() 1959 h->drv[drv_index]->block_size); cciss_add_disk() 1962 /* setting h->drv[drv_index]->queue, as setting this */ cciss_add_disk() 1965 h->drv[drv_index]->queue = disk->queue; cciss_add_disk() 2034 memcpy(drvinfo->LunID, h->drv[drv_index]->LunID, cciss_update_drive_info() 2038 if (h->drv[drv_index]->raid_level != -1 && cciss_update_drive_info() 2040 h->drv[drv_index]->serial_no, 16) == 0) && cciss_update_drive_info() 2041 drvinfo->block_size == h->drv[drv_index]->block_size && cciss_update_drive_info() 2042 drvinfo->nr_blocks == h->drv[drv_index]->nr_blocks && cciss_update_drive_info() 2043 drvinfo->heads == h->drv[drv_index]->heads && cciss_update_drive_info() 2044 drvinfo->sectors == h->drv[drv_index]->sectors && cciss_update_drive_info() 2045 drvinfo->cylinders == h->drv[drv_index]->cylinders)) cciss_update_drive_info() 2055 if (h->drv[drv_index]->raid_level != -1 && drv_index != 0) { cciss_update_drive_info() 2058 h->drv[drv_index]->busy_configuring = 1; cciss_update_drive_info() 2061 /* deregister_disk sets h->drv[drv_index]->queue = NULL cciss_update_drive_info() 2074 * above, then h->drv[drv_index] will be NULL. cciss_update_drive_info() 2076 if (h->drv[drv_index] == NULL) { cciss_update_drive_info() 2078 h->drv[drv_index] = drvinfo; cciss_update_drive_info() 2082 h->drv[drv_index]->block_size = drvinfo->block_size; cciss_update_drive_info() 2083 h->drv[drv_index]->nr_blocks = drvinfo->nr_blocks; cciss_update_drive_info() 2084 h->drv[drv_index]->heads = drvinfo->heads; cciss_update_drive_info() 2085 h->drv[drv_index]->sectors = drvinfo->sectors; cciss_update_drive_info() 2086 h->drv[drv_index]->cylinders = drvinfo->cylinders; cciss_update_drive_info() 2087 h->drv[drv_index]->raid_level = drvinfo->raid_level; cciss_update_drive_info() 2088 memcpy(h->drv[drv_index]->serial_no, drvinfo->serial_no, 16); cciss_update_drive_info() 2089 memcpy(h->drv[drv_index]->vendor, drvinfo->vendor, cciss_update_drive_info() 2091 memcpy(h->drv[drv_index]->model, drvinfo->model, MODEL_LEN + 1); cciss_update_drive_info() 2092 memcpy(h->drv[drv_index]->rev, drvinfo->rev, REV_LEN + 1); cciss_update_drive_info() 2097 set_capacity(disk, h->drv[drv_index]->nr_blocks); cciss_update_drive_info() 2125 * that has a null drv pointer and allocate the drive info struct and 2137 drive_info_struct *drv; cciss_alloc_drive_info() local 2143 if (h->drv[i] && i != 0) cciss_alloc_drive_info() 2146 * If it's cxd0 case, and drv is alloc'ed already, and a cciss_alloc_drive_info() 2149 if (i == 0 && h->drv[i] && h->drv[i]->raid_level != -1) cciss_alloc_drive_info() 2160 if (i == 0 && h->drv[i] != NULL) cciss_alloc_drive_info() 2167 drv = kzalloc(sizeof(*drv), GFP_KERNEL); cciss_alloc_drive_info() 2168 if (!drv) cciss_alloc_drive_info() 2170 drv->raid_level = -1; /* so we know it's new */ cciss_alloc_drive_info() 2171 h->drv[i] = drv; cciss_alloc_drive_info() 2179 kfree(h->drv[drv_index]); cciss_free_drive_info() 2180 h->drv[drv_index] = NULL; cciss_free_drive_info() 2189 /* cciss_add_gendisk finds a free hba[]->drv structure 2192 * the ->drv[] array, or -1 if none are free. 2218 memcpy(h->drv[drv_index]->LunID, lunid, cciss_add_gendisk() 2219 sizeof(h->drv[drv_index]->LunID)); cciss_add_gendisk() 2225 h->drv[drv_index]->busy_configuring = 0; cciss_add_gendisk() 2252 h->drv[drv_index]->block_size = 512; cciss_add_controller_node() 2253 h->drv[drv_index]->nr_blocks = 0; cciss_add_controller_node() 2254 h->drv[drv_index]->heads = 0; cciss_add_controller_node() 2255 h->drv[drv_index]->sectors = 0; cciss_add_controller_node() 2256 h->drv[drv_index]->cylinders = 0; cciss_add_controller_node() 2257 h->drv[drv_index]->raid_level = -1; cciss_add_controller_node() 2258 memset(h->drv[drv_index]->serial_no, 0, 16); cciss_add_controller_node() 2340 if (h->drv[i] == NULL) rebuild_lun_table() 2345 if (memcmp(h->drv[i]->LunID, lunid, rebuild_lun_table() 2354 h->drv[i]->busy_configuring = 1; rebuild_lun_table() 2357 if (h->drv[i] != NULL) rebuild_lun_table() 2358 h->drv[i]->busy_configuring = 0; rebuild_lun_table() 2379 if (h->drv[j] != NULL && rebuild_lun_table() 2380 memcmp(h->drv[j]->LunID, lunid, rebuild_lun_table() 2381 sizeof(h->drv[j]->LunID)) == 0) { rebuild_lun_table() 2432 * drv structures busy_configuring flag set. It's parameters are: 2435 * drv = This is the drive_info_struct associated with the disk to be 2456 drive_info_struct *drv; deregister_disk() local 2462 drv = h->drv[drv_index]; deregister_disk() 2467 if (drv->usage_count > via_ioctl) deregister_disk() 2469 } else if (drv->usage_count > 0) deregister_disk() 2472 recalculate_highest_lun = (drv == h->drv[h->highest_lun]); deregister_disk() 2508 cciss_clear_drive_info(drv); deregister_disk() 2518 if (h->drv[i] && h->drv[i]->heads) deregister_disk() 2844 drive_info_struct *drv) cciss_geometry_inquiry() 2859 drv->heads = 255; cciss_geometry_inquiry() 2860 drv->sectors = 32; /* Sectors per track */ cciss_geometry_inquiry() 2861 drv->cylinders = total_size + 1; cciss_geometry_inquiry() 2862 drv->raid_level = RAID_UNKNOWN; cciss_geometry_inquiry() 2864 drv->heads = inq_buff->data_byte[6]; cciss_geometry_inquiry() 2865 drv->sectors = inq_buff->data_byte[7]; cciss_geometry_inquiry() 2866 drv->cylinders = (inq_buff->data_byte[4] & 0xff) << 8; cciss_geometry_inquiry() 2867 drv->cylinders += inq_buff->data_byte[5]; cciss_geometry_inquiry() 2868 drv->raid_level = inq_buff->data_byte[8]; cciss_geometry_inquiry() 2870 drv->block_size = block_size; cciss_geometry_inquiry() 2871 drv->nr_blocks = total_size + 1; cciss_geometry_inquiry() 2872 t = drv->heads * drv->sectors; cciss_geometry_inquiry() 2878 drv->cylinders = real_size; cciss_geometry_inquiry() 2946 drive_info_struct *drv = get_drv(disk); cciss_revalidate() local 2954 if (!h->drv[logvol]) cciss_revalidate() 2956 if (memcmp(h->drv[logvol]->LunID, drv->LunID, cciss_revalidate() 2957 sizeof(drv->LunID)) == 0) { cciss_revalidate() 2979 inq_buff, drv); cciss_revalidate() 2981 blk_queue_logical_block_size(drv->queue, drv->block_size); cciss_revalidate() 2982 set_capacity(disk, drv->nr_blocks); cciss_revalidate() 3295 drive_info_struct *drv; do_cciss_request() local 3320 drv = creq->rq_disk->private_data; do_cciss_request() 3327 memcpy(&c->Header.LUN, drv->LunID, sizeof(drv->LunID)); do_cciss_request() 5085 h->drv[j] = NULL; cciss_init_one() 2840 cciss_geometry_inquiry(ctlr_info_t *h, int logvol, sector_t total_size, unsigned int block_size, InquiryData_struct *inq_buff, drive_info_struct *drv) cciss_geometry_inquiry() argument
|
H A D | cpqarray.c | 234 drv_info_t *drv; ida_proc_show() local 264 drv = &h->drv[i]; ida_proc_show() 266 ctlr, i, drv->blk_size, drv->nr_blks); ida_proc_show() 466 drv_info_t *drv = &hba[i]->drv[j]; cpqarray_register_ctlr() local 471 if (j && !drv->nr_blks) cpqarray_register_ctlr() 473 blk_queue_logical_block_size(hba[i]->queue, drv->blk_size); cpqarray_register_ctlr() 474 set_capacity(disk, drv->nr_blks); cpqarray_register_ctlr() 476 disk->private_data = drv; cpqarray_register_ctlr() 825 drv_info_t *drv = get_drv(bdev->bd_disk); ida_open() local 835 if (!drv->nr_blks) { ida_open() 838 if (!capable(CAP_SYS_ADMIN) && drv != host->drv) ida_open() 925 c->hdr.unit = (drv_info_t *)(creq->rq_disk->private_data) - h->drv; do_ida_request() 1125 drv_info_t *drv = get_drv(bdev->bd_disk); ida_getgeo() local 1127 if (drv->cylinders) { ida_getgeo() 1128 geo->heads = drv->heads; ida_getgeo() 1129 geo->sectors = drv->sectors; ida_getgeo() 1130 geo->cylinders = drv->cylinders; ida_getgeo() 1134 geo->cylinders = drv->nr_blks / (0xff*0x3f); ida_getgeo() 1146 drv_info_t *drv = get_drv(bdev->bd_disk); ida_locked_ioctl() local 1154 if (copy_to_user(&io->c.drv, drv, sizeof(drv_info_t))) ida_locked_ioctl() 1166 error = ida_ctlr_ioctl(host, drv - host->drv, my_io); ida_locked_ioctl() 1544 memset(host->drv, 0, sizeof(drv_info_t)*NWD); revalidate_allvol() 1557 drv_info_t *drv = &host->drv[i]; revalidate_allvol() local 1558 if (i && !drv->nr_blks) revalidate_allvol() 1560 blk_queue_logical_block_size(host->queue, drv->blk_size); revalidate_allvol() 1561 set_capacity(disk, drv->nr_blks); revalidate_allvol() 1563 disk->private_data = drv; revalidate_allvol() 1574 drv_info_t *drv = disk->private_data; ida_revalidate() local 1575 set_capacity(disk, drv->nr_blks); ida_revalidate() 1652 drv_info_t *drv; getgeometry() local 1756 drv = &info_p->drv[log_unit]; getgeometry() 1757 drv->blk_size = id_ldrive->blk_size; getgeometry() 1758 drv->nr_blks = id_ldrive->nr_blks; getgeometry() 1759 drv->cylinders = id_ldrive->drv.cyl; getgeometry() 1760 drv->heads = id_ldrive->drv.heads; getgeometry() 1761 drv->sectors = id_ldrive->drv.sect_per_track; getgeometry() 1765 ctlr, log_unit, drv->blk_size, drv->nr_blks); getgeometry()
|
/linux-4.1.27/drivers/memstick/core/ |
H A D | memstick.c | 44 static int memstick_bus_match(struct device *dev, struct device_driver *drv) memstick_bus_match() argument 48 struct memstick_driver *ms_drv = container_of(drv, memstick_bus_match() 84 struct memstick_driver *drv = container_of(dev->driver, memstick_device_probe() local 89 if (dev->driver && drv->probe) { memstick_device_probe() 90 rc = drv->probe(card); memstick_device_probe() 101 struct memstick_driver *drv = container_of(dev->driver, memstick_device_remove() local 105 if (dev->driver && drv->remove) { memstick_device_remove() 106 drv->remove(card); memstick_device_remove() 120 struct memstick_driver *drv = container_of(dev->driver, memstick_device_suspend() local 124 if (dev->driver && drv->suspend) memstick_device_suspend() 125 return drv->suspend(card, state); memstick_device_suspend() 133 struct memstick_driver *drv = container_of(dev->driver, memstick_device_resume() local 137 if (dev->driver && drv->resume) memstick_device_resume() 138 return drv->resume(card); memstick_device_resume() 605 int memstick_register_driver(struct memstick_driver *drv) memstick_register_driver() argument 607 drv->driver.bus = &memstick_bus_type; memstick_register_driver() 609 return driver_register(&drv->driver); memstick_register_driver() 613 void memstick_unregister_driver(struct memstick_driver *drv) memstick_unregister_driver() argument 615 driver_unregister(&drv->driver); memstick_unregister_driver()
|
/linux-4.1.27/drivers/macintosh/ |
H A D | macio_asic.c | 42 static int macio_bus_match(struct device *dev, struct device_driver *drv) macio_bus_match() argument 44 const struct of_device_id * matches = drv->of_match_table; macio_bus_match() 75 struct macio_driver *drv; macio_device_probe() local 79 drv = to_macio_driver(dev->driver); macio_device_probe() 82 if (!drv->probe) macio_device_probe() 87 match = of_match_device(drv->driver.of_match_table, dev); macio_device_probe() 89 error = drv->probe(macio_dev, match); macio_device_probe() 99 struct macio_driver * drv = to_macio_driver(dev->driver); macio_device_remove() local 101 if (dev->driver && drv->remove) macio_device_remove() 102 drv->remove(macio_dev); macio_device_remove() 111 struct macio_driver * drv = to_macio_driver(dev->driver); macio_device_shutdown() local 113 if (dev->driver && drv->shutdown) macio_device_shutdown() 114 drv->shutdown(macio_dev); macio_device_shutdown() 120 struct macio_driver * drv = to_macio_driver(dev->driver); macio_device_suspend() local 122 if (dev->driver && drv->suspend) macio_device_suspend() 123 return drv->suspend(macio_dev, state); macio_device_suspend() 130 struct macio_driver * drv = to_macio_driver(dev->driver); macio_device_resume() local 132 if (dev->driver && drv->resume) macio_device_resume() 133 return drv->resume(macio_dev); macio_device_resume() 525 * @drv: pointer to the driver definition structure 527 int macio_register_driver(struct macio_driver *drv) macio_register_driver() argument 530 drv->driver.bus = &macio_bus_type; macio_register_driver() 533 return driver_register(&drv->driver); macio_register_driver() 538 * @drv: pointer to the driver definition structure 540 void macio_unregister_driver(struct macio_driver *drv) macio_unregister_driver() argument 542 driver_unregister(&drv->driver); macio_unregister_driver()
|
/linux-4.1.27/drivers/base/power/ |
H A D | generic_ops.c | 62 struct device_driver *drv = dev->driver; pm_generic_prepare() local 65 if (drv && drv->pm && drv->pm->prepare) pm_generic_prepare() 66 ret = drv->pm->prepare(dev); pm_generic_prepare() 295 struct device_driver *drv = dev->driver; pm_generic_complete() local 297 if (drv && drv->pm && drv->pm->complete) pm_generic_complete() 298 drv->pm->complete(dev); pm_generic_complete()
|
/linux-4.1.27/drivers/video/fbdev/omap2/dss/ |
H A D | display.c | 136 struct omap_dss_driver *drv = dssdev->driver; omapdss_register_display() local 164 if (drv && drv->get_resolution == NULL) omapdss_register_display() 165 drv->get_resolution = omapdss_default_get_resolution; omapdss_register_display() 166 if (drv && drv->get_recommended_bpp == NULL) omapdss_register_display() 167 drv->get_recommended_bpp = omapdss_default_get_recommended_bpp; omapdss_register_display() 168 if (drv && drv->get_timings == NULL) omapdss_register_display() 169 drv->get_timings = omapdss_default_get_timings; omapdss_register_display()
|
/linux-4.1.27/drivers/spi/ |
H A D | spi-adi-v3.c | 368 static void adi_spi_next_transfer(struct adi_spi_master *drv) adi_spi_next_transfer() argument 370 struct spi_message *msg = drv->cur_msg; adi_spi_next_transfer() 371 struct spi_transfer *t = drv->cur_transfer; adi_spi_next_transfer() 375 drv->cur_transfer = list_entry(t->transfer_list.next, adi_spi_next_transfer() 377 drv->state = RUNNING_STATE; adi_spi_next_transfer() 379 drv->state = DONE_STATE; adi_spi_next_transfer() 380 drv->cur_transfer = NULL; adi_spi_next_transfer() 392 static int adi_spi_setup_transfer(struct adi_spi_master *drv) adi_spi_setup_transfer() argument 394 struct spi_transfer *t = drv->cur_transfer; adi_spi_setup_transfer() 398 drv->tx = (void *)t->tx_buf; adi_spi_setup_transfer() 399 drv->tx_end = drv->tx + t->len; adi_spi_setup_transfer() 401 drv->tx = NULL; adi_spi_setup_transfer() 405 drv->rx = t->rx_buf; adi_spi_setup_transfer() 406 drv->rx_end = drv->rx + t->len; adi_spi_setup_transfer() 408 drv->rx = NULL; adi_spi_setup_transfer() 411 drv->transfer_len = t->len; adi_spi_setup_transfer() 417 drv->ops = &adi_spi_transfer_ops_u8; adi_spi_setup_transfer() 421 drv->ops = &adi_spi_transfer_ops_u16; adi_spi_setup_transfer() 425 drv->ops = &adi_spi_transfer_ops_u32; adi_spi_setup_transfer() 430 cr = ioread32(&drv->regs->control) & ~SPI_CTL_SIZE; adi_spi_setup_transfer() 432 iowrite32(cr, &drv->regs->control); adi_spi_setup_transfer() 435 iowrite32(hz_to_spi_clock(drv->sclk, t->speed_hz), &drv->regs->clock); adi_spi_setup_transfer()
|
/linux-4.1.27/drivers/misc/mic/bus/ |
H A D | mic_bus.c | 102 struct mbus_driver *drv = drv_to_mbus(dev->dev.driver); mbus_dev_probe() local 104 err = drv->probe(dev); mbus_dev_probe() 106 if (drv->scan) mbus_dev_probe() 107 drv->scan(dev); mbus_dev_probe() 114 struct mbus_driver *drv = drv_to_mbus(dev->dev.driver); mbus_dev_remove() local 116 drv->remove(dev); mbus_dev_remove()
|
/linux-4.1.27/drivers/net/ethernet/sfc/ |
H A D | selftest.c | 136 netif_dbg(efx, drv, efx->net_dev, "testing interrupts\n"); efx_test_interrupts() 144 netif_dbg(efx, drv, efx->net_dev, "waiting for test interrupt\n"); efx_test_interrupts() 153 netif_err(efx, drv, efx->net_dev, "timed out waiting for interrupt\n"); efx_test_interrupts() 157 netif_dbg(efx, drv, efx->net_dev, "%s test interrupt seen on CPU%d\n", efx_test_interrupts() 217 netif_dbg(efx, drv, efx->net_dev, efx_for_each_channel() 226 netif_err(efx, drv, efx->net_dev, efx_for_each_channel() 230 netif_err(efx, drv, efx->net_dev, efx_for_each_channel() 235 netif_err(efx, drv, efx->net_dev, efx_for_each_channel() 291 netif_err(efx, drv, efx->net_dev, efx_loopback_rx_packet() 299 netif_err(efx, drv, efx->net_dev, efx_loopback_rx_packet() 307 netif_err(efx, drv, efx->net_dev, efx_loopback_rx_packet() 316 netif_err(efx, drv, efx->net_dev, efx_loopback_rx_packet() 324 netif_err(efx, drv, efx->net_dev, efx_loopback_rx_packet() 332 netif_err(efx, drv, efx->net_dev, efx_loopback_rx_packet() 340 netif_vdbg(efx, drv, efx->net_dev, efx_loopback_rx_packet() 349 netif_err(efx, drv, efx->net_dev, "received packet:\n"); efx_loopback_rx_packet() 352 netif_err(efx, drv, efx->net_dev, "expected packet:\n"); efx_loopback_rx_packet() 431 netif_err(efx, drv, efx->net_dev, efx_begin_loopback() 482 netif_err(efx, drv, efx->net_dev, efx_end_loopback() 493 netif_dbg(efx, drv, efx->net_dev, efx_end_loopback() 529 netif_dbg(efx, drv, efx->net_dev, efx_test_loopback() 556 netif_dbg(efx, drv, efx->net_dev, efx_test_loopback() 632 netif_err(efx, drv, efx->net_dev, efx_test_loopbacks() 640 netif_err(efx, drv, efx->net_dev, efx_test_loopbacks()
|
H A D | efx.c | 224 netif_err(efx, drv, efx->net_dev, efx_check_disabled() 351 netif_dbg(efx, drv, efx->net_dev, efx_init_eventq() 395 netif_dbg(channel->efx, drv, channel->efx->net_dev, efx_fini_eventq() 404 netif_dbg(channel->efx, drv, channel->efx->net_dev, efx_remove_eventq() 621 netif_dbg(efx, drv, efx->net_dev, efx_start_datapath() 626 netif_dbg(efx, drv, efx->net_dev, efx_start_datapath() 707 netif_err(efx, drv, efx->net_dev, 711 netif_err(efx, drv, efx->net_dev, "failed to flush queues\n"); 713 netif_dbg(efx, drv, efx->net_dev, 730 netif_dbg(channel->efx, drv, channel->efx->net_dev, efx_remove_channel() 838 netif_err(efx, drv, efx->net_dev, 1032 netif_dbg(efx, drv, efx->net_dev, "init port\n"); efx_init_port() 1101 netif_dbg(efx, drv, efx->net_dev, "shut down port\n"); efx_fini_port() 1115 netif_dbg(efx, drv, efx->net_dev, "destroying port\n"); efx_remove_port() 1272 netif_dbg(efx, drv, efx->net_dev, "shutting down I/O\n"); efx_fini_io() 1360 netif_err(efx, drv, efx->net_dev, efx_probe_interrupts() 1363 netif_err(efx, drv, efx->net_dev, efx_probe_interrupts() 1366 netif_err(efx, drv, efx->net_dev, efx_probe_interrupts() 1399 netif_err(efx, drv, efx->net_dev, efx_probe_interrupts() 1642 netif_dbg(efx, drv, efx->net_dev, "destroying NIC\n"); efx_remove_nic() 1860 netif_err(efx, drv, efx->net_dev, "Channels are shared. " efx_init_irq_moderation() 2142 netif_dbg(efx, drv, efx->net_dev, "changing MTU to %d\n", new_mtu); efx_change_mtu() 2164 netif_err(efx, drv, efx->net_dev, efx_set_mac_address() 2343 netif_err(efx, drv, efx->net_dev, 2357 netif_err(efx, drv, efx->net_dev, "could not register net dev\n"); 2418 netif_err(efx, drv, efx->net_dev, "failed to initialise NIC\n"); efx_reset_up() 2430 netif_err(efx, drv, efx->net_dev, efx_reset_up() 2464 netif_info(efx, drv, efx->net_dev, "resetting (%s)\n", efx_reset() 2472 netif_err(efx, drv, efx->net_dev, "failed to reset hardware\n"); efx_reset() 2504 netif_err(efx, drv, efx->net_dev, "has been disabled\n"); efx_reset() 2507 netif_dbg(efx, drv, efx->net_dev, "reset complete\n"); efx_reset() 2547 netif_err(efx, drv, efx->net_dev, "Warning: No MC reboot after BIST mode\n"); efx_wait_for_bist_end() 2595 netif_dbg(efx, drv, efx->net_dev, efx_schedule_reset() 2611 netif_dbg(efx, drv, efx->net_dev, "scheduling %s reset\n", efx_schedule_reset() 2616 netif_dbg(efx, drv, efx->net_dev, efx_schedule_reset() 2837 netif_dbg(efx, drv, efx->net_dev, "shutdown successful\n"); efx_pci_remove() 2861 netif_err(efx, drv, efx->net_dev, "Unable to read VPD\n"); efx_probe_vpd_strings() 2868 netif_err(efx, drv, efx->net_dev, "VPD Read-only not found\n"); efx_probe_vpd_strings() 2881 netif_err(efx, drv, efx->net_dev, "Part number not found\n"); efx_probe_vpd_strings() 2888 netif_err(efx, drv, efx->net_dev, "Incomplete part number\n"); efx_probe_vpd_strings() 2892 netif_info(efx, drv, efx->net_dev, efx_probe_vpd_strings() 2899 netif_err(efx, drv, efx->net_dev, "Serial number not found\n"); efx_probe_vpd_strings() 2906 netif_err(efx, drv, efx->net_dev, "Incomplete serial number\n"); efx_probe_vpd_strings() 3056 netif_dbg(efx, drv, efx->net_dev, "initialisation failed. rc=%d\n", rc); efx_pci_probe()
|
/linux-4.1.27/drivers/usb/serial/ |
H A D | bus.c | 20 struct device_driver *drv) usb_serial_device_match() 33 driver = to_usb_serial_driver(drv); usb_serial_device_match() 154 static void free_dynids(struct usb_serial_driver *drv) free_dynids() argument 158 spin_lock(&drv->dynids.lock); free_dynids() 159 list_for_each_entry_safe(dynid, n, &drv->dynids.list, node) { free_dynids() 163 spin_unlock(&drv->dynids.lock); free_dynids() 19 usb_serial_device_match(struct device *dev, struct device_driver *drv) usb_serial_device_match() argument
|
H A D | usb-serial.c | 265 struct usb_serial_driver *drv = port->serial->type; serial_port_shutdown() local 267 if (drv->close) serial_port_shutdown() 268 drv->close(port); serial_port_shutdown() 619 struct usb_serial_driver *drv) match_dynamic_id() 623 spin_lock(&drv->dynids.lock); match_dynamic_id() 624 list_for_each_entry(dynid, &drv->dynids.list, node) { match_dynamic_id() 626 spin_unlock(&drv->dynids.lock); match_dynamic_id() 630 spin_unlock(&drv->dynids.lock); match_dynamic_id() 634 static const struct usb_device_id *get_iface_id(struct usb_serial_driver *drv, get_iface_id() argument 639 id = usb_match_id(intf, drv->id_table); get_iface_id() 644 id = match_dynamic_id(intf, drv); get_iface_id() 656 struct usb_serial_driver *drv; search_serial_device() local 660 list_for_each_entry(drv, &usb_serial_driver_list, driver_list) { search_serial_device() 661 if (drv->usb_driver == driver) search_serial_device() 662 id = get_iface_id(drv, iface); search_serial_device() 664 return drv; search_serial_device() 673 struct usb_serial_driver *drv = p->serial->type; serial_port_carrier_raised() local 675 if (drv->carrier_raised) serial_port_carrier_raised() 676 return drv->carrier_raised(p); serial_port_carrier_raised() 684 struct usb_serial_driver *drv = p->serial->type; serial_port_dtr_rts() local 686 if (drv->dtr_rts) serial_port_dtr_rts() 687 drv->dtr_rts(p, on); serial_port_dtr_rts() 618 match_dynamic_id(struct usb_interface *intf, struct usb_serial_driver *drv) match_dynamic_id() argument
|
/linux-4.1.27/drivers/mfd/ |
H A D | mcp-core.c | 24 #define to_mcp_driver(d) container_of(d, struct mcp_driver, drv) 26 static int mcp_bus_match(struct device *dev, struct device_driver *drv) mcp_bus_match() argument 34 struct mcp_driver *drv = to_mcp_driver(dev->driver); mcp_bus_probe() local 36 return drv->probe(mcp); mcp_bus_probe() 42 struct mcp_driver *drv = to_mcp_driver(dev->driver); mcp_bus_remove() local 44 drv->remove(mcp); mcp_bus_remove() 213 mcpdrv->drv.bus = &mcp_bus_type; mcp_driver_register() 214 return driver_register(&mcpdrv->drv); mcp_driver_register() 220 driver_unregister(&mcpdrv->drv); mcp_driver_unregister()
|
H A D | ucb1x00-core.c | 393 static int ucb1x00_add_dev(struct ucb1x00 *ucb, struct ucb1x00_driver *drv) ucb1x00_add_dev() argument 403 dev->drv = drv; ucb1x00_add_dev() 405 ret = drv->add(dev); ucb1x00_add_dev() 412 list_add_tail(&dev->drv_node, &drv->devs); ucb1x00_add_dev() 419 dev->drv->remove(dev); ucb1x00_remove_dev() 502 struct ucb1x00_driver *drv; ucb1x00_probe() local 597 list_for_each_entry(drv, &ucb1x00_drivers, node) { ucb1x00_probe() 598 ucb1x00_add_dev(ucb, drv); ucb1x00_probe() 644 int ucb1x00_register_driver(struct ucb1x00_driver *drv) ucb1x00_register_driver() argument 648 INIT_LIST_HEAD(&drv->devs); ucb1x00_register_driver() 650 list_add_tail(&drv->node, &ucb1x00_drivers); ucb1x00_register_driver() 652 ucb1x00_add_dev(ucb, drv); ucb1x00_register_driver() 658 void ucb1x00_unregister_driver(struct ucb1x00_driver *drv) ucb1x00_unregister_driver() argument 663 list_del(&drv->node); ucb1x00_unregister_driver() 664 list_for_each_safe(l, n, &drv->devs) { ucb1x00_unregister_driver() 680 if (udev->drv->suspend) ucb1x00_suspend() 681 udev->drv->suspend(udev); ucb1x00_suspend() 733 if (udev->drv->resume) ucb1x00_resume() 734 udev->drv->resume(udev); ucb1x00_resume() 744 .drv = {
|
/linux-4.1.27/include/xen/ |
H A D | xenbus.h | 108 static inline struct xenbus_driver *to_xenbus_driver(struct device_driver *drv) to_xenbus_driver() argument 110 return container_of(drv, struct xenbus_driver, driver); to_xenbus_driver() 113 int __must_check __xenbus_register_frontend(struct xenbus_driver *drv, 116 int __must_check __xenbus_register_backend(struct xenbus_driver *drv, 120 #define xenbus_register_frontend(drv) \ 121 __xenbus_register_frontend(drv, THIS_MODULE, KBUILD_MODNAME) 122 #define xenbus_register_backend(drv) \ 123 __xenbus_register_backend(drv, THIS_MODULE, KBUILD_MODNAME) 125 void xenbus_unregister_driver(struct xenbus_driver *drv);
|
/linux-4.1.27/arch/arm/mach-omap2/ |
H A D | cpuidle34xx.c | 106 * @drv: cpuidle driver 110 struct cpuidle_driver *drv, omap3_enter_idle() 156 * @drv: cpuidle driver 167 struct cpuidle_driver *drv, int index) next_valid_state() 210 * @drv: cpuidle driver 217 struct cpuidle_driver *drv, omap3_enter_idle_bm() 229 new_state_idx = drv->safe_state_index; omap3_enter_idle_bm() 231 new_state_idx = next_valid_state(dev, drv, index); omap3_enter_idle_bm() 251 ret = omap3_enter_idle(dev, drv, new_state_idx); omap3_enter_idle_bm() 109 omap3_enter_idle(struct cpuidle_device *dev, struct cpuidle_driver *drv, int index) omap3_enter_idle() argument 166 next_valid_state(struct cpuidle_device *dev, struct cpuidle_driver *drv, int index) next_valid_state() argument 216 omap3_enter_idle_bm(struct cpuidle_device *dev, struct cpuidle_driver *drv, int index) omap3_enter_idle_bm() argument
|
H A D | cpuidle44xx.c | 65 * @drv: cpuidle driver 73 struct cpuidle_driver *drv, omap_enter_idle_simple() 81 struct cpuidle_driver *drv, omap_enter_idle_coupled() 72 omap_enter_idle_simple(struct cpuidle_device *dev, struct cpuidle_driver *drv, int index) omap_enter_idle_simple() argument 80 omap_enter_idle_coupled(struct cpuidle_device *dev, struct cpuidle_driver *drv, int index) omap_enter_idle_coupled() argument
|
/linux-4.1.27/arch/arm/mach-imx/ |
H A D | cpuidle-imx5.c | 14 struct cpuidle_driver *drv, int index) imx5_cpuidle_enter() 13 imx5_cpuidle_enter(struct cpuidle_device *dev, struct cpuidle_driver *drv, int index) imx5_cpuidle_enter() argument
|
H A D | cpuidle-imx6sl.c | 17 struct cpuidle_driver *drv, int index) imx6sl_enter_wait() 16 imx6sl_enter_wait(struct cpuidle_device *dev, struct cpuidle_driver *drv, int index) imx6sl_enter_wait() argument
|
H A D | cpuidle-imx6q.c | 21 struct cpuidle_driver *drv, int index) imx6q_enter_wait() 20 imx6q_enter_wait(struct cpuidle_device *dev, struct cpuidle_driver *drv, int index) imx6q_enter_wait() argument
|
/linux-4.1.27/drivers/gpu/drm/ |
H A D | drm_mipi_dsi.c | 48 static int mipi_dsi_device_match(struct device *dev, struct device_driver *drv) mipi_dsi_device_match() argument 50 return of_driver_match_device(dev, drv); mipi_dsi_device_match() 867 struct mipi_dsi_driver *drv = to_mipi_dsi_driver(dev->driver); mipi_dsi_drv_probe() local 870 return drv->probe(dsi); mipi_dsi_drv_probe() 875 struct mipi_dsi_driver *drv = to_mipi_dsi_driver(dev->driver); mipi_dsi_drv_remove() local 878 return drv->remove(dsi); mipi_dsi_drv_remove() 883 struct mipi_dsi_driver *drv = to_mipi_dsi_driver(dev->driver); mipi_dsi_drv_shutdown() local 886 drv->shutdown(dsi); mipi_dsi_drv_shutdown() 891 * @drv: DSI driver structure 896 int mipi_dsi_driver_register_full(struct mipi_dsi_driver *drv, mipi_dsi_driver_register_full() argument 899 drv->driver.bus = &mipi_dsi_bus_type; mipi_dsi_driver_register_full() 900 drv->driver.owner = owner; mipi_dsi_driver_register_full() 902 if (drv->probe) mipi_dsi_driver_register_full() 903 drv->driver.probe = mipi_dsi_drv_probe; mipi_dsi_driver_register_full() 904 if (drv->remove) mipi_dsi_driver_register_full() 905 drv->driver.remove = mipi_dsi_drv_remove; mipi_dsi_driver_register_full() 906 if (drv->shutdown) mipi_dsi_driver_register_full() 907 drv->driver.shutdown = mipi_dsi_drv_shutdown; mipi_dsi_driver_register_full() 909 return driver_register(&drv->driver); mipi_dsi_driver_register_full() 915 * @drv: DSI driver structure 919 void mipi_dsi_driver_unregister(struct mipi_dsi_driver *drv) mipi_dsi_driver_unregister() argument 921 driver_unregister(&drv->driver); mipi_dsi_driver_unregister()
|
/linux-4.1.27/drivers/bus/ |
H A D | mips_cdmm.c | 38 #define to_mips_cdmm_driver(d) container_of(d, struct mips_cdmm_driver, drv) 60 static int mips_cdmm_match(struct device *dev, struct device_driver *drv) mips_cdmm_match() argument 63 struct mips_cdmm_driver *cdrv = to_mips_cdmm_driver(drv); mips_cdmm_match() 214 * @drv: CDMM driver information. 221 int mips_cdmm_driver_register(struct mips_cdmm_driver *drv) mips_cdmm_driver_register() argument 223 drv->drv.bus = &mips_cdmm_bustype; mips_cdmm_driver_register() 225 if (drv->probe) mips_cdmm_driver_register() 226 drv->drv.probe = mips_cdmm_probe; mips_cdmm_driver_register() 227 if (drv->remove) mips_cdmm_driver_register() 228 drv->drv.remove = mips_cdmm_remove; mips_cdmm_driver_register() 229 if (drv->shutdown) mips_cdmm_driver_register() 230 drv->drv.shutdown = mips_cdmm_shutdown; mips_cdmm_driver_register() 232 return driver_register(&drv->drv); mips_cdmm_driver_register() 238 * @drv: CDMM driver information. 242 void mips_cdmm_driver_unregister(struct mips_cdmm_driver *drv) mips_cdmm_driver_unregister() argument 244 driver_unregister(&drv->drv); mips_cdmm_driver_unregister()
|
/linux-4.1.27/drivers/ps3/ |
H A D | ps3-vuart.c | 677 struct ps3_vuart_port_driver *drv = ps3_vuart_work() local 680 BUG_ON(!drv); ps3_vuart_work() 681 drv->work(dev); ps3_vuart_work() 997 struct ps3_vuart_port_driver *drv; ps3_vuart_probe() local 1002 drv = ps3_system_bus_dev_to_vuart_drv(dev); ps3_vuart_probe() 1005 drv->core.core.name); ps3_vuart_probe() 1007 BUG_ON(!drv); ps3_vuart_probe() 1060 if (drv->probe) ps3_vuart_probe() 1061 result = drv->probe(dev); ps3_vuart_probe() 1069 dev_dbg(&dev->core, "%s:%d: drv->probe failed\n", ps3_vuart_probe() 1122 struct ps3_vuart_port_driver *drv; ps3_vuart_remove() local 1138 drv = ps3_system_bus_dev_to_vuart_drv(dev); ps3_vuart_remove() 1140 BUG_ON(!drv); ps3_vuart_remove() 1142 if (drv->remove) { ps3_vuart_remove() 1143 drv->remove(dev); ps3_vuart_remove() 1173 struct ps3_vuart_port_driver *drv; ps3_vuart_shutdown() local 1189 drv = ps3_system_bus_dev_to_vuart_drv(dev); ps3_vuart_shutdown() 1191 BUG_ON(!drv); ps3_vuart_shutdown() 1193 if (drv->shutdown) ps3_vuart_shutdown() 1194 drv->shutdown(dev); ps3_vuart_shutdown() 1195 else if (drv->remove) { ps3_vuart_shutdown() 1198 drv->remove(dev); ps3_vuart_shutdown() 1237 int ps3_vuart_port_driver_register(struct ps3_vuart_port_driver *drv) ps3_vuart_port_driver_register() argument 1241 pr_debug("%s:%d: (%s)\n", __func__, __LINE__, drv->core.core.name); ps3_vuart_port_driver_register() 1243 BUG_ON(!drv->core.match_id); ps3_vuart_port_driver_register() 1244 BUG_ON(!drv->core.core.name); ps3_vuart_port_driver_register() 1246 drv->core.probe = ps3_vuart_probe; ps3_vuart_port_driver_register() 1247 drv->core.remove = ps3_vuart_remove; ps3_vuart_port_driver_register() 1248 drv->core.shutdown = ps3_vuart_shutdown; ps3_vuart_port_driver_register() 1250 result = ps3_system_bus_driver_register(&drv->core); ps3_vuart_port_driver_register() 1259 void ps3_vuart_port_driver_unregister(struct ps3_vuart_port_driver *drv) ps3_vuart_port_driver_unregister() argument 1261 pr_debug("%s:%d: (%s)\n", __func__, __LINE__, drv->core.core.name); ps3_vuart_port_driver_unregister() 1262 ps3_system_bus_driver_unregister(&drv->core); ps3_vuart_port_driver_unregister()
|
H A D | vuart.h | 57 int ps3_vuart_port_driver_register(struct ps3_vuart_port_driver *drv); 58 void ps3_vuart_port_driver_unregister(struct ps3_vuart_port_driver *drv);
|
/linux-4.1.27/drivers/amba/ |
H A D | bus.c | 25 #define to_amba_driver(d) container_of(d, struct amba_driver, drv) 42 static int amba_match(struct device *dev, struct device_driver *drv) amba_match() argument 45 struct amba_driver *pcdrv = to_amba_driver(drv); amba_match() 49 return !strcmp(pcdev->driver_override, drv->name); amba_match() 272 struct amba_driver *drv = to_amba_driver(dev->driver); amba_remove() local 276 ret = drv->remove(pcdev); amba_remove() 292 struct amba_driver *drv = to_amba_driver(dev->driver); amba_shutdown() local 293 drv->shutdown(to_amba_device(dev)); amba_shutdown() 298 * @drv: amba device driver structure 304 int amba_driver_register(struct amba_driver *drv) amba_driver_register() argument 306 drv->drv.bus = &amba_bustype; amba_driver_register() 308 #define SETFN(fn) if (drv->fn) drv->drv.fn = amba_##fn amba_driver_register() 313 return driver_register(&drv->drv); amba_driver_register() 318 * @drv: AMBA device driver structure to remove 324 void amba_driver_unregister(struct amba_driver *drv) amba_driver_unregister() argument 326 driver_unregister(&drv->drv); amba_driver_unregister()
|
/linux-4.1.27/drivers/net/ethernet/emulex/benet/ |
H A D | be_roce.h | 72 int be_roce_register_driver(struct ocrdma_driver *drv); 73 void be_roce_unregister_driver(struct ocrdma_driver *drv);
|
H A D | be_roce.c | 165 int be_roce_register_driver(struct ocrdma_driver *drv) be_roce_register_driver() argument 174 ocrdma_drv = drv; be_roce_register_driver() 188 void be_roce_unregister_driver(struct ocrdma_driver *drv) be_roce_unregister_driver() argument
|
/linux-4.1.27/arch/parisc/include/asm/ |
H A D | parisc-device.h | 38 struct device_driver drv; member in struct:parisc_driver 43 #define to_parisc_driver(d) container_of(d, struct parisc_driver, drv)
|
/linux-4.1.27/arch/ia64/include/asm/sn/ |
H A D | tiocx.h | 58 #define to_cx_driver(drv) container_of(drv, struct cx_drv, driver)
|
/linux-4.1.27/drivers/media/pci/bt8xx/ |
H A D | bttv-gpio.c | 43 static int bttv_sub_bus_match(struct device *dev, struct device_driver *drv) bttv_sub_bus_match() argument 45 struct bttv_sub_driver *sub = to_bttv_sub_drv(drv); bttv_sub_bus_match() 125 sub->drv.bus = &bttv_sub_bus_type; bttv_sub_register() 127 return driver_register(&sub->drv); bttv_sub_register() 133 driver_unregister(&sub->drv); bttv_sub_unregister()
|
/linux-4.1.27/drivers/ipack/ |
H A D | ipack.c | 19 #define to_ipack_driver(drv) container_of(drv, struct ipack_driver, driver) 55 static int ipack_bus_match(struct device *dev, struct device_driver *drv) ipack_bus_match() argument 58 struct ipack_driver *idrv = to_ipack_driver(drv); ipack_bus_match() 68 struct ipack_driver *drv = to_ipack_driver(device->driver); ipack_bus_probe() local 70 if (!drv->ops->probe) ipack_bus_probe() 73 return drv->ops->probe(dev); ipack_bus_probe() 79 struct ipack_driver *drv = to_ipack_driver(device->driver); ipack_bus_remove() local 81 if (!drv->ops->remove) ipack_bus_remove() 84 drv->ops->remove(dev); ipack_bus_remove()
|
/linux-4.1.27/drivers/ide/ |
H A D | ide.c | 110 static int ide_bus_match(struct device *dev, struct device_driver *drv) ide_bus_match() argument 128 struct ide_driver *drv = to_ide_driver(dev->driver); generic_ide_probe() local 130 return drv->probe ? drv->probe(drive) : -ENODEV; generic_ide_probe() 136 struct ide_driver *drv = to_ide_driver(dev->driver); generic_ide_remove() local 138 if (drv->remove) generic_ide_remove() 139 drv->remove(drive); generic_ide_remove() 147 struct ide_driver *drv = to_ide_driver(dev->driver); generic_ide_shutdown() local 149 if (dev->driver && drv->shutdown) generic_ide_shutdown() 150 drv->shutdown(drive); generic_ide_shutdown()
|
/linux-4.1.27/arch/arm/common/ |
H A D | locomo.c | 824 struct locomo_driver *drv = LOCOMO_DRV(_drv); locomo_match() local 826 return dev->devid == drv->devid; locomo_match() 832 struct locomo_driver *drv = LOCOMO_DRV(dev->driver); locomo_bus_suspend() local 835 if (drv && drv->suspend) locomo_bus_suspend() 836 ret = drv->suspend(ldev, state); locomo_bus_suspend() 843 struct locomo_driver *drv = LOCOMO_DRV(dev->driver); locomo_bus_resume() local 846 if (drv && drv->resume) locomo_bus_resume() 847 ret = drv->resume(ldev); locomo_bus_resume() 854 struct locomo_driver *drv = LOCOMO_DRV(dev->driver); locomo_bus_probe() local 857 if (drv->probe) locomo_bus_probe() 858 ret = drv->probe(ldev); locomo_bus_probe() 865 struct locomo_driver *drv = LOCOMO_DRV(dev->driver); locomo_bus_remove() local 868 if (drv->remove) locomo_bus_remove() 869 ret = drv->remove(ldev); locomo_bus_remove() 884 driver->drv.bus = &locomo_bus_type; locomo_driver_register() 885 return driver_register(&driver->drv); locomo_driver_register() 891 driver_unregister(&driver->drv); locomo_driver_unregister()
|
H A D | sa1111.c | 1293 struct sa1111_driver *drv = SA1111_DRV(_drv); sa1111_match() local 1295 return dev->devid & drv->devid; sa1111_match() 1301 struct sa1111_driver *drv = SA1111_DRV(dev->driver); sa1111_bus_suspend() local 1304 if (drv && drv->suspend) sa1111_bus_suspend() 1305 ret = drv->suspend(sadev, state); sa1111_bus_suspend() 1312 struct sa1111_driver *drv = SA1111_DRV(dev->driver); sa1111_bus_resume() local 1315 if (drv && drv->resume) sa1111_bus_resume() 1316 ret = drv->resume(sadev); sa1111_bus_resume() 1322 struct sa1111_driver *drv = SA1111_DRV(dev->driver); sa1111_bus_shutdown() local 1324 if (drv && drv->shutdown) sa1111_bus_shutdown() 1325 drv->shutdown(SA1111_DEV(dev)); sa1111_bus_shutdown() 1331 struct sa1111_driver *drv = SA1111_DRV(dev->driver); sa1111_bus_probe() local 1334 if (drv->probe) sa1111_bus_probe() 1335 ret = drv->probe(sadev); sa1111_bus_probe() 1342 struct sa1111_driver *drv = SA1111_DRV(dev->driver); sa1111_bus_remove() local 1345 if (drv->remove) sa1111_bus_remove() 1346 ret = drv->remove(sadev); sa1111_bus_remove() 1363 driver->drv.bus = &sa1111_bus_type; sa1111_driver_register() 1364 return driver_register(&driver->drv); sa1111_driver_register() 1370 driver_unregister(&driver->drv); sa1111_driver_unregister()
|
/linux-4.1.27/drivers/fmc/ |
H A D | fmc-core.c | 125 int fmc_driver_register(struct fmc_driver *drv) fmc_driver_register() argument 127 if (fmc_check_version(drv->version, drv->driver.name)) fmc_driver_register() 129 drv->driver.bus = &fmc_bus_type; fmc_driver_register() 130 return driver_register(&drv->driver); fmc_driver_register() 134 void fmc_driver_unregister(struct fmc_driver *drv) fmc_driver_unregister() argument 136 driver_unregister(&drv->driver); fmc_driver_unregister()
|
H A D | fmc-match.c | 22 int fmc_match(struct device *dev, struct device_driver *drv) fmc_match() argument 24 struct fmc_driver *fdrv = to_fmc_driver(drv); fmc_match()
|
/linux-4.1.27/kernel/sched/ |
H A D | idle.c | 82 struct cpuidle_driver *drv = cpuidle_get_cpu_driver(dev); cpuidle_idle_call() local 108 if (cpuidle_not_available(drv, dev)) cpuidle_idle_call() 121 entered_state = cpuidle_enter_freeze(drv, dev); cpuidle_idle_call() 128 next_state = cpuidle_find_deepest_state(drv, dev); cpuidle_idle_call() 134 next_state = cpuidle_select(drv, dev); cpuidle_idle_call() 153 idle_set_state(this_rq(), &drv->states[next_state]); cpuidle_idle_call() 160 entered_state = cpuidle_enter(drv, dev, next_state); cpuidle_idle_call()
|
/linux-4.1.27/arch/sparc/kernel/ |
H A D | vio.c | 48 static int vio_bus_match(struct device *dev, struct device_driver *drv) vio_bus_match() argument 51 struct vio_driver *vio_drv = to_vio_driver(drv); vio_bus_match() 63 struct vio_driver *drv = to_vio_driver(dev->driver); vio_device_probe() local 67 if (drv->probe) { vio_device_probe() 68 id = vio_match_device(drv->id_table, vdev); vio_device_probe() 70 error = drv->probe(vdev, id); vio_device_probe() 79 struct vio_driver *drv = to_vio_driver(dev->driver); vio_device_remove() local 81 if (drv->remove) vio_device_remove() 82 return drv->remove(vdev); vio_device_remove()
|
/linux-4.1.27/drivers/s390/cio/ |
H A D | css.c | 1042 static int css_settle(struct device_driver *drv, void *unused) css_settle() argument 1044 struct css_driver *cssdrv = to_cssdriver(drv); css_settle() 1131 static int css_bus_match(struct device *dev, struct device_driver *drv) css_bus_match() argument 1134 struct css_driver *driver = to_cssdriver(drv); css_bus_match() 1193 struct css_driver *drv; css_pm_prepare() local 1199 drv = to_cssdriver(sch->dev.driver); css_pm_prepare() 1201 return drv->prepare ? drv->prepare(sch) : 0; css_pm_prepare() 1207 struct css_driver *drv; css_pm_complete() local 1211 drv = to_cssdriver(sch->dev.driver); css_pm_complete() 1212 if (drv->complete) css_pm_complete() 1213 drv->complete(sch); css_pm_complete() 1219 struct css_driver *drv; css_pm_freeze() local 1223 drv = to_cssdriver(sch->dev.driver); css_pm_freeze() 1224 return drv->freeze ? drv->freeze(sch) : 0; css_pm_freeze() 1230 struct css_driver *drv; css_pm_thaw() local 1234 drv = to_cssdriver(sch->dev.driver); css_pm_thaw() 1235 return drv->thaw ? drv->thaw(sch) : 0; css_pm_thaw() 1241 struct css_driver *drv; css_pm_restore() local 1246 drv = to_cssdriver(sch->dev.driver); css_pm_restore() 1247 return drv->restore ? drv->restore(sch) : 0; css_pm_restore() 1277 cdrv->drv.bus = &css_bus_type; css_driver_register() 1278 return driver_register(&cdrv->drv); css_driver_register() 1290 driver_unregister(&cdrv->drv); css_driver_unregister()
|
H A D | device.c | 58 ccw_bus_match (struct device * dev, struct device_driver * drv) ccw_bus_match() argument 61 struct ccw_driver *cdrv = to_ccwdrv(drv); ccw_bus_match() 176 .drv = { 328 if (!cdev->online || !cdev->drv) ccw_device_set_offline() 331 if (cdev->drv->set_offline) { ccw_device_set_offline() 332 ret = cdev->drv->set_offline(cdev); ccw_device_set_offline() 405 if (cdev->online || !cdev->drv) ccw_device_set_online() 445 if (cdev->drv->set_online) ccw_device_set_online() 446 ret = cdev->drv->set_online(cdev); ccw_device_set_online() 495 if (cdev->drv && cdev->drv->set_offline) online_store_handle_offline() 513 if (cdev->drv && cdev->drv->set_online) online_store_recog_and_online() 859 if (!cdev->drv) { io_subchannel_register() 1578 struct ccw_driver *cdrv = cdev->drv; ccw_device_set_int_class() 1594 if (!cdev->drv || !cdev->handler) ccw_device_enable_console() 1628 struct ccw_device * __init ccw_device_create_console(struct ccw_driver *drv) ccw_device_create_console() argument 1650 cdev->drv = drv; ccw_device_create_console() 1748 cdev->drv = cdrv; /* to let the driver call _set_online */ ccw_device_probe() 1752 cdev->drv = NULL; ccw_device_probe() 1763 struct ccw_driver *cdrv = cdev->drv; ccw_device_remove() 1787 cdev->drv = NULL; ccw_device_remove() 1798 if (cdev->drv && cdev->drv->shutdown) ccw_device_shutdown() 1799 cdev->drv->shutdown(cdev); ccw_device_shutdown() 1813 if (cdev->online && cdev->drv && cdev->drv->prepare) ccw_device_pm_prepare() 1814 return cdev->drv->prepare(cdev); ccw_device_pm_prepare() 1823 if (cdev->online && cdev->drv && cdev->drv->complete) ccw_device_pm_complete() 1824 cdev->drv->complete(cdev); ccw_device_pm_complete() 1838 if (cdev->drv && cdev->drv->freeze) { ccw_device_pm_freeze() 1839 ret = cdev->drv->freeze(cdev); ccw_device_pm_freeze() 1884 if (cdev->drv && cdev->drv->thaw) ccw_device_pm_thaw() 1885 ret = cdev->drv->thaw(cdev); ccw_device_pm_thaw() 2015 if (cdev->online && cdev->drv && cdev->drv->restore) ccw_device_pm_restore() 2016 ret = cdev->drv->restore(cdev); ccw_device_pm_restore() 2052 struct device_driver *drv = &cdriver->driver; ccw_driver_register() local 2054 drv->bus = &ccw_bus_type; ccw_driver_register() 2056 return driver_register(drv); ccw_driver_register()
|
H A D | scm.c | 20 #define to_scm_drv(d) container_of(d, struct scm_driver, drv) 56 struct device_driver *drv = &scmdrv->drv; scm_driver_register() local 58 drv->bus = &scm_bus_type; scm_driver_register() 60 return driver_register(drv); scm_driver_register() 70 driver_unregister(&scmdrv->drv); scm_driver_unregister()
|
H A D | css.h | 67 * @drv: embedded device driver structure 83 struct device_driver drv; member in struct:css_driver 98 #define to_cssdriver(n) container_of(n, struct css_driver, drv)
|
/linux-4.1.27/drivers/input/joystick/ |
H A D | joydump.c | 49 static int joydump_connect(struct gameport *gameport, struct gameport_driver *drv) joydump_connect() argument 62 if (gameport_open(gameport, drv, GAMEPORT_MODE_RAW)) { joydump_connect() 66 if (gameport_open(gameport, drv, GAMEPORT_MODE_COOKED)) { joydump_connect()
|
/linux-4.1.27/sound/soc/sh/rcar/ |
H A D | core.c | 620 struct snd_soc_dai_driver *drv; rsnd_dai_probe() local 636 drv = devm_kzalloc(dev, sizeof(*drv) * dai_nr, GFP_KERNEL); rsnd_dai_probe() 638 if (!drv || !rdai) { rsnd_dai_probe() 644 priv->daidrv = drv; rsnd_dai_probe() 661 drv[i].name = rdai[i].name; rsnd_dai_probe() 662 drv[i].ops = &rsnd_soc_dai_ops; rsnd_dai_probe() 667 drv[i].playback.rates = RSND_RATES; rsnd_dai_probe() 668 drv[i].playback.formats = RSND_FMTS; rsnd_dai_probe() 669 drv[i].playback.channels_min = 2; rsnd_dai_probe() 670 drv[i].playback.channels_max = 2; rsnd_dai_probe() 671 drv[i].playback.stream_name = rdai[i].playback.name; rsnd_dai_probe() 681 drv[i].capture.rates = RSND_RATES; rsnd_dai_probe() 682 drv[i].capture.formats = RSND_FMTS; rsnd_dai_probe() 683 drv[i].capture.channels_min = 2; rsnd_dai_probe() 684 drv[i].capture.channels_max = 2; rsnd_dai_probe() 685 drv[i].capture.stream_name = rdai[i].capture.name; rsnd_dai_probe()
|
/linux-4.1.27/drivers/idle/ |
H A D | intel_idle.c | 99 struct cpuidle_driver *drv, int index); 101 struct cpuidle_driver *drv, int index); 654 * @drv: cpuidle driver 660 struct cpuidle_driver *drv, int index) intel_idle() 663 struct cpuidle_state *state = &drv->states[index]; intel_idle() 691 * @drv: cpuidle driver 695 struct cpuidle_driver *drv, int index) intel_idle_freeze() 698 unsigned long eax = flg2MWAIT(drv->states[index].flags); intel_idle_freeze() 959 struct cpuidle_driver *drv = &intel_idle_driver; intel_idle_cpuidle_driver_init() local 963 drv->state_count = 1; intel_idle_cpuidle_driver_init() 993 drv->states[drv->state_count] = /* structure copy */ intel_idle_cpuidle_driver_init() 996 drv->state_count += 1; intel_idle_cpuidle_driver_init() 1057 struct cpuidle_driver *drv = cpuidle_get_driver(); intel_idle_init() local 1059 drv ? drv->name : "none"); intel_idle_init() 659 intel_idle(struct cpuidle_device *dev, struct cpuidle_driver *drv, int index) intel_idle() argument 694 intel_idle_freeze(struct cpuidle_device *dev, struct cpuidle_driver *drv, int index) intel_idle_freeze() argument
|
/linux-4.1.27/drivers/char/hw_random/ |
H A D | Makefile | 14 n2-rng-y := n2-drv.o n2-asm.o
|
/linux-4.1.27/drivers/usb/host/ |
H A D | ohci-ps3.c | 229 static int __init ps3_ohci_driver_register(struct ps3_system_bus_driver *drv) ps3_ohci_driver_register() argument 232 ? ps3_system_bus_driver_register(drv) ps3_ohci_driver_register() 236 static void ps3_ohci_driver_unregister(struct ps3_system_bus_driver *drv) ps3_ohci_driver_unregister() argument 239 ps3_system_bus_driver_unregister(drv); ps3_ohci_driver_unregister()
|
/linux-4.1.27/drivers/pps/clients/ |
H A D | pps-ldisc.c | 60 struct tty_driver *drv = tty->driver; pps_tty_open() local 61 int index = tty->index + drv->name_base; pps_tty_open() 67 snprintf(info.name, PPS_MAX_NAME_LEN, "%s%d", drv->driver_name, index); pps_tty_open() 68 snprintf(info.path, PPS_MAX_NAME_LEN, "/dev/%s%d", drv->name, index); pps_tty_open()
|
/linux-4.1.27/include/net/caif/ |
H A D | caif_hsi.h | 96 void (*tx_done_cb) (struct cfhsi_cb_ops *drv); 97 void (*rx_done_cb) (struct cfhsi_cb_ops *drv); 98 void (*wake_up_cb) (struct cfhsi_cb_ops *drv); 99 void (*wake_down_cb) (struct cfhsi_cb_ops *drv);
|
/linux-4.1.27/arch/powerpc/include/asm/ |
H A D | vio.h | 129 extern int __vio_register_driver(struct vio_driver *drv, struct module *owner, 136 extern void vio_unregister_driver(struct vio_driver *drv); 162 static inline struct vio_driver *to_vio_driver(struct device_driver *drv) to_vio_driver() argument 164 return container_of(drv, struct vio_driver, driver); to_vio_driver()
|
H A D | ibmebus.h | 51 int ibmebus_register_driver(struct platform_driver *drv); 52 void ibmebus_unregister_driver(struct platform_driver *drv);
|
H A D | macio.h | 138 #define to_macio_driver(drv) container_of(drv,struct macio_driver, driver)
|
/linux-4.1.27/arch/arm/mach-s3c64xx/ |
H A D | cpuidle.c | 27 struct cpuidle_driver *drv, s3c64xx_enter_idle() 26 s3c64xx_enter_idle(struct cpuidle_device *dev, struct cpuidle_driver *drv, int index) s3c64xx_enter_idle() argument
|
/linux-4.1.27/samples/rpmsg/ |
H A D | rpmsg_client_sample.c | 79 .drv.name = KBUILD_MODNAME, 80 .drv.owner = THIS_MODULE,
|
/linux-4.1.27/drivers/pcmcia/ |
H A D | ds.c | 130 retval = driver_attach(&pdrv->drv); pcmcia_store_new_id() 139 pcmcia_free_dynids(struct pcmcia_driver *drv) pcmcia_free_dynids() argument 143 mutex_lock(&drv->dynids.lock); pcmcia_free_dynids() 144 list_for_each_entry_safe(dynid, n, &drv->dynids.list, node) { pcmcia_free_dynids() 148 mutex_unlock(&drv->dynids.lock); pcmcia_free_dynids() 152 pcmcia_create_newid_file(struct pcmcia_driver *drv) pcmcia_create_newid_file() argument 155 if (drv->probe != NULL) pcmcia_create_newid_file() 156 error = driver_create_file(&drv->drv, &driver_attr_new_id); pcmcia_create_newid_file() 161 pcmcia_remove_newid_file(struct pcmcia_driver *drv) pcmcia_remove_newid_file() argument 163 driver_remove_file(&drv->drv, &driver_attr_new_id); pcmcia_remove_newid_file() 182 driver->drv.bus = &pcmcia_bus_type; pcmcia_register_driver() 183 driver->drv.owner = driver->owner; pcmcia_register_driver() 184 driver->drv.name = driver->name; pcmcia_register_driver() 190 error = driver_register(&driver->drv); pcmcia_register_driver() 196 driver_unregister(&driver->drv); pcmcia_register_driver() 210 driver_unregister(&driver->drv); pcmcia_unregister_driver() 895 static int pcmcia_bus_match(struct device *dev, struct device_driver *drv) pcmcia_bus_match() argument 898 struct pcmcia_driver *p_drv = to_pcmcia_drv(drv); pcmcia_bus_match() 905 dev_dbg(dev, "trying to match to %s\n", drv->name); pcmcia_bus_match() 907 dev_dbg(dev, "matched to %s\n", drv->name); pcmcia_bus_match() 915 dev_dbg(dev, "trying to match to %s\n", drv->name); pcmcia_bus_match() 917 dev_dbg(dev, "matched to %s\n", drv->name); pcmcia_bus_match()
|
/linux-4.1.27/drivers/sh/maple/ |
H A D | maple.c | 66 * @drv: maple driver to be registered. 68 * Registers the passed in @drv, while updating the bus type. 71 int maple_driver_register(struct maple_driver *drv) maple_driver_register() argument 73 if (!drv) maple_driver_register() 76 drv->drv.bus = &maple_bus_type; maple_driver_register() 78 return driver_register(&drv->drv); maple_driver_register() 84 * @drv: maple driver to unregister. 89 void maple_driver_unregister(struct maple_driver *drv) maple_driver_unregister() argument 91 driver_unregister(&drv->drv); maple_driver_unregister() 775 .drv = { 810 retval = driver_register(&maple_unsupported_device.drv); maple_bus_init() 880 driver_unregister(&maple_unsupported_device.drv); maple_bus_init()
|
/linux-4.1.27/drivers/infiniband/hw/nes/ |
H A D | nes.c | 1204 static int nes_create_driver_sysfs(struct pci_driver *drv) nes_create_driver_sysfs() argument 1207 error = driver_create_file(&drv->driver, &driver_attr_adapter); nes_create_driver_sysfs() 1208 error |= driver_create_file(&drv->driver, &driver_attr_eeprom_cmd); nes_create_driver_sysfs() 1209 error |= driver_create_file(&drv->driver, &driver_attr_eeprom_data); nes_create_driver_sysfs() 1210 error |= driver_create_file(&drv->driver, &driver_attr_flash_cmd); nes_create_driver_sysfs() 1211 error |= driver_create_file(&drv->driver, &driver_attr_flash_data); nes_create_driver_sysfs() 1212 error |= driver_create_file(&drv->driver, &driver_attr_nonidx_addr); nes_create_driver_sysfs() 1213 error |= driver_create_file(&drv->driver, &driver_attr_nonidx_data); nes_create_driver_sysfs() 1214 error |= driver_create_file(&drv->driver, &driver_attr_idx_addr); nes_create_driver_sysfs() 1215 error |= driver_create_file(&drv->driver, &driver_attr_idx_data); nes_create_driver_sysfs() 1216 error |= driver_create_file(&drv->driver, &driver_attr_wqm_quanta); nes_create_driver_sysfs() 1220 static void nes_remove_driver_sysfs(struct pci_driver *drv) nes_remove_driver_sysfs() argument 1222 driver_remove_file(&drv->driver, &driver_attr_adapter); nes_remove_driver_sysfs() 1223 driver_remove_file(&drv->driver, &driver_attr_eeprom_cmd); nes_remove_driver_sysfs() 1224 driver_remove_file(&drv->driver, &driver_attr_eeprom_data); nes_remove_driver_sysfs() 1225 driver_remove_file(&drv->driver, &driver_attr_flash_cmd); nes_remove_driver_sysfs() 1226 driver_remove_file(&drv->driver, &driver_attr_flash_data); nes_remove_driver_sysfs() 1227 driver_remove_file(&drv->driver, &driver_attr_nonidx_addr); nes_remove_driver_sysfs() 1228 driver_remove_file(&drv->driver, &driver_attr_nonidx_data); nes_remove_driver_sysfs() 1229 driver_remove_file(&drv->driver, &driver_attr_idx_addr); nes_remove_driver_sysfs() 1230 driver_remove_file(&drv->driver, &driver_attr_idx_data); nes_remove_driver_sysfs() 1231 driver_remove_file(&drv->driver, &driver_attr_wqm_quanta); nes_remove_driver_sysfs()
|
/linux-4.1.27/drivers/usb/core/ |
H A D | file.c | 63 struct usb_class_driver *drv; usb_devnode() local 65 drv = dev_get_drvdata(dev); usb_devnode() 66 if (!drv || !drv->devnode) usb_devnode() 68 return drv->devnode(dev, mode); usb_devnode()
|
/linux-4.1.27/drivers/vme/ |
H A D | vme.c | 1384 static int __vme_register_driver_bus(struct vme_driver *drv, __vme_register_driver_bus() argument 1400 vdev->dev.platform_data = drv; __vme_register_driver_bus() 1404 dev_set_name(&vdev->dev, "%s.%u-%u", drv->name, bridge->num, __vme_register_driver_bus() 1412 list_add_tail(&vdev->drv_list, &drv->devices); __vme_register_driver_bus() 1423 list_for_each_entry_safe(vdev, tmp, &drv->devices, drv_list) { __vme_register_driver_bus() 1431 static int __vme_register_driver(struct vme_driver *drv, unsigned int ndevs) __vme_register_driver() argument 1445 err = __vme_register_driver_bus(drv, bridge, ndevs); __vme_register_driver() 1453 int vme_register_driver(struct vme_driver *drv, unsigned int ndevs) vme_register_driver() argument 1457 drv->driver.name = drv->name; vme_register_driver() 1458 drv->driver.bus = &vme_bus_type; vme_register_driver() 1459 INIT_LIST_HEAD(&drv->devices); vme_register_driver() 1461 err = driver_register(&drv->driver); vme_register_driver() 1465 err = __vme_register_driver(drv, ndevs); vme_register_driver() 1467 driver_unregister(&drv->driver); vme_register_driver() 1473 void vme_unregister_driver(struct vme_driver *drv) vme_unregister_driver() argument 1478 list_for_each_entry_safe(dev, dev_tmp, &drv->devices, drv_list) { vme_unregister_driver() 1485 driver_unregister(&drv->driver); vme_unregister_driver() 1491 static int vme_bus_match(struct device *dev, struct device_driver *drv) vme_bus_match() argument 1495 vme_drv = container_of(drv, struct vme_driver, driver); vme_bus_match()
|
/linux-4.1.27/arch/arm/mach-rpc/ |
H A D | ecard.c | 1034 struct ecard_driver *drv = ECARD_DRV(dev->driver); ecard_drv_probe() local 1038 id = ecard_match_device(drv->id_table, ec); ecard_drv_probe() 1041 ret = drv->probe(ec, id); ecard_drv_probe() 1050 struct ecard_driver *drv = ECARD_DRV(dev->driver); ecard_drv_remove() local 1052 drv->remove(ec); ecard_drv_remove() 1075 struct ecard_driver *drv = ECARD_DRV(dev->driver); ecard_drv_shutdown() local 1079 if (drv->shutdown) ecard_drv_shutdown() 1080 drv->shutdown(ec); ecard_drv_shutdown() 1094 int ecard_register_driver(struct ecard_driver *drv) ecard_register_driver() argument 1096 drv->drv.bus = &ecard_bus_type; ecard_register_driver() 1098 return driver_register(&drv->drv); ecard_register_driver() 1101 void ecard_remove_driver(struct ecard_driver *drv) ecard_remove_driver() argument 1103 driver_unregister(&drv->drv); ecard_remove_driver() 1109 struct ecard_driver *drv = ECARD_DRV(_drv); ecard_match() local 1112 if (drv->id_table) { ecard_match() 1113 ret = ecard_match_device(drv->id_table, ec) != NULL; ecard_match() 1115 ret = ec->cid.id == drv->id; ecard_match()
|
/linux-4.1.27/sound/soc/intel/boards/ |
H A D | cht_bsw_rt5645.c | 293 struct cht_mc_private *drv; snd_cht_mc_probe() local 295 drv = devm_kzalloc(&pdev->dev, sizeof(*drv), GFP_ATOMIC); snd_cht_mc_probe() 296 if (!drv) snd_cht_mc_probe() 300 snd_soc_card_set_drvdata(&snd_soc_card_cht, drv); snd_cht_mc_probe()
|
/linux-4.1.27/drivers/isdn/capi/ |
H A D | capi.c | 1255 struct tty_driver *drv; capinc_tty_init() local 1268 drv = alloc_tty_driver(capi_ttyminors); capinc_tty_init() 1269 if (!drv) { capinc_tty_init() 1273 drv->driver_name = "capi_nc"; capinc_tty_init() 1274 drv->name = "capi!"; capinc_tty_init() 1275 drv->major = 0; capinc_tty_init() 1276 drv->minor_start = 0; capinc_tty_init() 1277 drv->type = TTY_DRIVER_TYPE_SERIAL; capinc_tty_init() 1278 drv->subtype = SERIAL_TYPE_NORMAL; capinc_tty_init() 1279 drv->init_termios = tty_std_termios; capinc_tty_init() 1280 drv->init_termios.c_iflag = ICRNL; capinc_tty_init() 1281 drv->init_termios.c_oflag = OPOST | ONLCR; capinc_tty_init() 1282 drv->init_termios.c_cflag = B9600 | CS8 | CREAD | HUPCL | CLOCAL; capinc_tty_init() 1283 drv->init_termios.c_lflag = 0; capinc_tty_init() 1284 drv->flags = capinc_tty_init() 1287 tty_set_operations(drv, &capinc_ops); capinc_tty_init() 1289 err = tty_register_driver(drv); capinc_tty_init() 1291 put_tty_driver(drv); capinc_tty_init() 1296 capinc_tty_driver = drv; capinc_tty_init()
|
/linux-4.1.27/drivers/net/phy/ |
H A D | phy.c | 90 if (phydev->drv->ack_interrupt) phy_clear_interrupt() 91 return phydev->drv->ack_interrupt(phydev); phy_clear_interrupt() 106 if (phydev->drv->config_intr) phy_config_interrupt() 107 return phydev->drv->config_intr(phydev); phy_config_interrupt() 123 if (phydev->drv->aneg_done) phy_aneg_done() 124 return phydev->drv->aneg_done(phydev); phy_aneg_done() 433 if (phydev->drv->hwtstamp) phy_mii_ioctl() 434 return phydev->drv->hwtstamp(phydev, ifr); phy_mii_ioctl() 464 err = phydev->drv->config_aneg(phydev); phy_start_aneg() 665 if (phydev->drv->did_interrupt && phy_change() 666 !phydev->drv->did_interrupt(phydev)) phy_change() 791 if (phydev->drv->link_change_notify) phy_state_machine() 792 phydev->drv->link_change_notify(phydev); phy_state_machine() 998 struct phy_driver *phydrv = phydev->drv; phy_read_mmd_indirect() 1032 struct phy_driver *phydrv = phydev->drv; phy_write_mmd_indirect() 1199 if (phydev->drv->set_wol) phy_ethtool_set_wol() 1200 return phydev->drv->set_wol(phydev, wol); phy_ethtool_set_wol() 1208 if (phydev->drv->get_wol) phy_ethtool_get_wol() 1209 phydev->drv->get_wol(phydev, wol); phy_ethtool_get_wol()
|
H A D | phy_device.c | 541 if (!phydev->drv || !phydev->drv->config_init) phy_init_hw() 544 if (phydev->drv->soft_reset) phy_init_hw() 545 ret = phydev->drv->soft_reset(phydev); phy_init_hw() 556 return phydev->drv->config_init(phydev); phy_init_hw() 1243 struct device_driver *drv = phydev->dev.driver; phy_probe() local 1244 struct phy_driver *phydrv = to_phy_driver(drv); phy_probe() 1247 phydev->drv = phydrv; phy_probe() 1272 if (phydev->drv->probe) phy_probe() 1273 err = phydev->drv->probe(phydev); phy_probe() 1288 if (phydev->drv->remove) phy_remove() 1289 phydev->drv->remove(phydev); phy_remove() 1290 phydev->drv = NULL; phy_remove() 1338 void phy_driver_unregister(struct phy_driver *drv) phy_driver_unregister() argument 1340 driver_unregister(&drv->driver); phy_driver_unregister() 1344 void phy_drivers_unregister(struct phy_driver *drv, int n) phy_drivers_unregister() argument 1349 phy_driver_unregister(drv + i); phy_drivers_unregister()
|
/linux-4.1.27/arch/x86/kernel/ |
H A D | probe_roms.c | 82 struct pci_driver *drv = pdev->driver; match_id() local 88 for (id = drv ? drv->id_table : NULL; id && id->vendor; id++) match_id()
|
/linux-4.1.27/drivers/input/touchscreen/ |
H A D | touchright.c | 103 static int tr_connect(struct serio *serio, struct serio_driver *drv) tr_connect() argument 134 err = serio_open(serio, drv); tr_connect()
|
H A D | tsc40.c | 80 static int tsc_connect(struct serio *serio, struct serio_driver *drv) tsc_connect() argument 112 error = serio_open(serio, drv); tsc_connect()
|
H A D | fujitsu_ts.c | 100 static int fujitsu_connect(struct serio *serio, struct serio_driver *drv) fujitsu_connect() argument 131 err = serio_open(serio, drv); fujitsu_connect()
|
/linux-4.1.27/drivers/hv/ |
H A D | vmbus_drv.c | 498 struct hv_driver *drv = drv_to_hv_drv(driver); vmbus_match() local 501 if (hv_vmbus_get_id(drv->id_table, hv_dev->dev_type.b)) vmbus_match() 513 struct hv_driver *drv = vmbus_probe() local 518 dev_id = hv_vmbus_get_id(drv->id_table, dev->dev_type.b); vmbus_probe() 519 if (drv->probe) { vmbus_probe() 520 ret = drv->probe(dev, dev_id); vmbus_probe() 538 struct hv_driver *drv; vmbus_remove() local 543 drv = drv_to_hv_drv(child_device->driver); vmbus_remove() 544 if (drv->remove) vmbus_remove() 545 drv->remove(dev); vmbus_remove() 568 struct hv_driver *drv; vmbus_shutdown() local 576 drv = drv_to_hv_drv(child_device->driver); vmbus_shutdown() 578 if (drv->shutdown) vmbus_shutdown() 579 drv->shutdown(dev); vmbus_shutdown() 867 * @drv: Pointer to driver structure you want to register 868 * @owner: owner module of the drv 899 * @drv: Pointer to driver structure you want to un-register
|