Projectname
large_stringclasses
15 values
Filepath
large_stringlengths
4
106
⌀
Function
large_stringlengths
11
3.45k
Label
list
Linux Kernel
drivers/auxdisplay/panel.c
static void lcd_write_data_tilcd(struct hd44780_common *hdc, int data) { spin_lock_irq(&pprt_lock); w_dtr(pprt, data); udelay(60); spin_unlock_irq(&pprt_lock); }
[ 0, 0 ]
Linux Kernel
drivers/auxdisplay/panel.c
static void phys_scan_contacts(void) { int bit, bitval; char oldval; char bitmask; char gndmask; phys_prev = phys_curr; phys_read_prev = phys_read; phys_read = 0; /* keep track of old value, with all outputs disabled */ oldval = r_dtr(pprt) | scan_mask_o; /* activate all keyboard outputs (active l...
[ 1, 0 ]
Linux Kernel
drivers/auxdisplay/panel.c
static inline void input_state_falling(struct logical_input *input) { #if 0 /* FIXME !!! same comment as in input_state_high */ if (((phys_prev & input->mask) == input->value) && ((phys_curr & input->mask) > input->value)) { input->state = INPUT_ST_LOW; /* invalidate */ return; } #endif if ((phys_curr &...
[ 1, 1 ]
Linux Kernel
drivers/auxdisplay/panel.c
static void init_scan_timer(void) { if (scan_timer.function) return; timer_setup(&scan_timer, panel_scan_timer, 0); scan_timer.expires = jiffies + INPUT_POLL_TIME; add_timer(&scan_timer); }
[ 0, 0 ]
Linux Kernel
drivers/auxdisplay/panel.c
static struct logical_input *panel_bind_key(const char *name, const char *press, const char *repeat, const char *release) { struct logical_input *key; key = kzalloc(sizeof(*key), GFP_KERNEL); if (!key) return NULL; if ...
[ 1, 0 ]
Linux Kernel
drivers/auxdisplay/panel.c
static void panel_attach(struct parport *port) { struct pardev_cb panel_cb; if (port->number != parport) return; if (pprt) { pr_err("%s: port->number=%d parport=%d, already registered!\n", __func__, port->number, parport); return; } memset(&panel_cb, 0, sizeof(panel_cb)); panel_cb....
[ 1, 0 ]
Linux Kernel
drivers/auxdisplay/panel.c
static void __exit panel_cleanup_module(void) { parport_unregister_driver(&panel_driver); }
[ 0, 0 ]
Linux Kernel
drivers/base/arch_numa.c
static __init int numa_parse_early_param(char *opt) { if (!opt) return -EINVAL; if (str_has_prefix(opt, "off")) numa_off = true; return 0; }
[ 0, 0 ]
Linux Kernel
drivers/base/arch_numa.c
static void numa_update_cpu(unsigned int cpu, bool remove) { int nid = cpu_to_node(cpu); if (nid == NUMA_NO_NODE) return; if (remove) cpumask_clear_cpu(cpu, node_to_cpumask_map[nid]); else cpumask_set_cpu(cpu, node_to_cpumask_map[nid]); }
[ 0, 0 ]
Linux Kernel
drivers/base/arch_numa.c
void numa_store_cpu_info(unsigned int cpu) { set_cpu_numa_node(cpu, cpu_to_node_map[cpu]); }
[ 0, 0 ]
Linux Kernel
drivers/base/arch_numa.c
void __init numa_free_distance(void) { size_t size; if (!numa_distance) return; size = numa_distance_cnt * numa_distance_cnt * sizeof(numa_distance[0]); memblock_free(numa_distance, size); numa_distance_cnt = 0; numa_distance = NULL; }
[ 1, 0 ]
Linux Kernel
drivers/base/arch_numa.c
void __init numa_set_distance(int from, int to, int distance) { if (!numa_distance) { pr_warn_once("Warning: distance table not allocated yet\n"); return; } if (from >= numa_distance_cnt || to >= numa_distance_cnt || from < 0 || to < 0) { pr_warn_once( "Warning: node ids are out of boun...
[ 1, 0 ]
Linux Kernel
drivers/base/arch_numa.c
int __node_distance(int from, int to) { if (from >= numa_distance_cnt || to >= numa_distance_cnt) return from == to ? LOCAL_DISTANCE : REMOTE_DISTANCE; return numa_distance[from * numa_distance_cnt + to]; }
[ 1, 0 ]
Linux Kernel
drivers/base/arch_numa.c
static int __init numa_init(int (*init_func)(void)) { int ret; nodes_clear(numa_nodes_parsed); nodes_clear(node_possible_map); nodes_clear(node_online_map); ret = numa_alloc_distance(); if (ret < 0) return ret; ret = init_func(); if (ret < 0) goto out_free_distance; if (nodes_empty(numa_n...
[ 0, 0 ]
Linux Kernel
drivers/base/arch_topology.c
void topology_clear_scale_freq_source(enum scale_freq_source source, const struct cpumask *cpus) { struct scale_freq_data *sfd; int cpu; rcu_read_lock(); for_each_cpu(cpu, cpus) { sfd = rcu_dereference(*per_cpu_ptr(&sft_data, cpu)); if (sfd && sfd->source == sour...
[ 1, 0 ]
Linux Kernel
drivers/base/arch_topology.c
void topology_init_cpu_capacity_cppc(void) { struct cppc_perf_caps perf_caps; int cpu; if (likely(!acpi_cpc_valid())) return; raw_capacity = kcalloc(num_possible_cpus(), sizeof(*raw_capacity), GFP_KERNEL); if (!raw_capacity) return; for_each_possible_cpu(cpu) { if (!cppc_get_perf_caps(...
[ 1, 0 ]
Linux Kernel
drivers/base/arch_topology.c
static int __init parse_core(struct device_node *core, int package_id, int cluster_id, int core_id) { char name[20]; bool leaf = true; int i = 0; int cpu; struct device_node *t; do { snprintf(name, sizeof(name), "thread%d", i); t = of_get_child_by_name(core, name); ...
[ 1, 0 ]
Linux Kernel
drivers/base/arch_topology.c
static int __init parse_socket(struct device_node *socket) { char name[20]; struct device_node *c; bool has_socket = false; int package_id = 0, ret; do { snprintf(name, sizeof(name), "socket%d", package_id); c = of_get_child_by_name(socket, name); if (c) { has_socket = true; ret = pa...
[ 1, 0 ]
Linux Kernel
drivers/base/arch_topology.c
static int __init parse_dt_topology(void) { struct device_node *cn, *map; int ret = 0; int cpu; cn = of_find_node_by_path("/cpus"); if (!cn) { pr_err("No CPU information found in DT\n"); return 0; } map = of_get_child_by_name(cn, "cpu-map"); if (!map) goto out; ret = parse_socket(map); ...
[ 0, 0 ]
Linux Kernel
drivers/base/attribute_container.c
static void internal_container_klist_put(struct klist_node *n) { struct internal_container *ic = container_of(n, struct internal_container, node); put_device(&ic->classdev); }
[ 0, 0 ]
Linux Kernel
drivers/base/attribute_container.c
int attribute_container_register(struct attribute_container *cont) { INIT_LIST_HEAD(&cont->node); klist_init(&cont->containers, internal_container_klist_get, internal_container_klist_put); mutex_lock(&attribute_container_mutex); list_add_tail(&cont->node, &attribute_container_list); mutex_unlock...
[ 0, 0 ]
Linux Kernel
drivers/base/attribute_container.c
int attribute_container_unregister(struct attribute_container *cont) { int retval = -EBUSY; mutex_lock(&attribute_container_mutex); spin_lock(&cont->containers.k_lock); if (!list_empty(&cont->containers.k_list)) goto out; retval = 0; list_del(&cont->node); out: spin_unlock(&cont->containers.k_lock); ...
[ 0, 0 ]
Linux Kernel
drivers/base/attribute_container.c
static void attribute_container_release(struct device *classdev) { struct internal_container *ic = container_of(classdev, struct internal_container, classdev); struct device *dev = classdev->parent; kfree(ic); put_device(dev); }
[ 0, 0 ]
Linux Kernel
drivers/base/attribute_container.c
int attribute_container_device_trigger_safe( struct device *dev, int (*fn)(struct attribute_container *, struct device *, struct device *), int (*undo)(struct attribute_container *, struct device *, struct device *)) { struct attribute_container *cont, *failed = NULL; int ret = 0; mut...
[ 0, 0 ]
Linux Kernel
drivers/base/attribute_container.c
void attribute_container_trigger(struct device *dev, int (*fn)(struct attribute_container *, struct device *)) { struct attribute_container *cont; mutex_lock(&attribute_container_mutex); list_for_each_entry(cont, &attribute_container_lis...
[ 0, 0 ]
Linux Kernel
drivers/base/attribute_container.c
int attribute_container_add_class_device(struct device *classdev) { int error = device_add(classdev); if (error) return error; return attribute_container_add_attrs(classdev); }
[ 0, 0 ]
Linux Kernel
drivers/base/attribute_container.c
void attribute_container_class_device_del(struct device *classdev) { attribute_container_remove_attrs(classdev); device_del(classdev); }
[ 0, 0 ]
Linux Kernel
drivers/base/auxiliary.c
static int auxiliary_bus_probe(struct device *dev) { struct auxiliary_driver *auxdrv = to_auxiliary_drv(dev->driver); struct auxiliary_device *auxdev = to_auxiliary_dev(dev); int ret; ret = dev_pm_domain_attach(dev, true); if (ret) { dev_warn(dev, "Failed to attach to PM Domain : %d\n", ret); return...
[ 0, 0 ]
Linux Kernel
drivers/base/auxiliary.c
static void auxiliary_bus_shutdown(struct device *dev) { struct auxiliary_driver *auxdrv = NULL; struct auxiliary_device *auxdev; if (dev->driver) { auxdrv = to_auxiliary_drv(dev->driver); auxdev = to_auxiliary_dev(dev); } if (auxdrv && auxdrv->shutdown) auxdrv->shutdown(auxdev); }
[ 1, 0 ]
Linux Kernel
drivers/base/auxiliary.c
void auxiliary_driver_unregister(struct auxiliary_driver *auxdrv) { driver_unregister(&auxdrv->driver); kfree(auxdrv->driver.name); }
[ 0, 0 ]
Linux Kernel
drivers/base/base.h
static inline int hypervisor_init(void) { return 0; } #endif
[ 0, 0 ]
Linux Kernel
drivers/base/base.h
static inline void auxiliary_bus_init(void) {} #endif
[ 0, 0 ]
Linux Kernel
drivers/base/base.h
static inline int driver_match_device(struct device_driver *drv, struct device *dev) { return drv->bus->match ? drv->bus->match(dev, drv) : 1; }
[ 1, 0 ]
Linux Kernel
drivers/base/base.h
static inline void module_add_driver(struct module *mod, struct device_driver *drv) {}
[ 0, 0 ]
Linux Kernel
drivers/base/base.h
static inline int devtmpfs_create_node(struct device *dev) { return 0; }
[ 0, 0 ]
Linux Kernel
drivers/base/base.h
static inline int devtmpfs_delete_node(struct device *dev) { return 0; } #endif
[ 0, 0 ]
Linux Kernel
drivers/base/bus.c
static void driver_release(struct kobject *kobj) { struct driver_private *drv_priv = to_driver(kobj); pr_debug("driver: '%s': %s\n", kobject_name(kobj), __func__); kfree(drv_priv); }
[ 0, 0 ]
Linux Kernel
drivers/base/bus.c
void bus_remove_file(struct bus_type *bus, struct bus_attribute *attr) { if (bus_get(bus)) { sysfs_remove_file(&bus->p->subsys.kobj, &attr->attr); bus_put(bus); } }
[ 0, 0 ]
Linux Kernel
drivers/base/bus.c
static ssize_t drivers_probe_store(struct bus_type *bus, const char *buf, size_t count) { struct device *dev; int err = -EINVAL; dev = bus_find_device_by_name(bus, NULL, buf); if (!dev) return -ENODEV; if (bus_rescan_devices_helper(dev, NULL) == 0) err = count; p...
[ 0, 0 ]
Linux Kernel
drivers/base/bus.c
static struct device *next_device(struct klist_iter *i) { struct klist_node *n = klist_next(i); struct device *dev = NULL; struct device_private *dev_prv; if (n) { dev_prv = to_device_private_bus(n); dev = dev_prv->device; } return dev; }
[ 0, 0 ]
Linux Kernel
drivers/base/bus.c
struct device * bus_find_device(struct bus_type *bus, struct device *start, const void *data, int (*match)(struct device *dev, const void *data)) { struct klist_iter i; struct device *dev; if (!bus || !bus->p) return NULL; klist_iter_init_node(&bus->p->klist_devices, &i, ...
[ 0, 0 ]
Linux Kernel
drivers/base/bus.c
int bus_for_each_drv(struct bus_type *bus, struct device_driver *start, void *data, int (*fn)(struct device_driver *, void *)) { struct klist_iter i; struct device_driver *drv; int error = 0; if (!bus) return -EINVAL; klist_iter_init_node(&bus->p->klist_drivers, &i, ...
[ 0, 0 ]
Linux Kernel
drivers/base/bus.c
int bus_add_driver(struct device_driver *drv) { struct bus_type *bus; struct driver_private *priv; int error = 0; bus = bus_get(drv->bus); if (!bus) return -EINVAL; pr_debug("bus: '%s': add driver %s\n", bus->name, drv->name); priv = kzalloc(sizeof(*priv), GFP_KERNEL); if (!priv) { error = -E...
[ 1, 0 ]
Linux Kernel
drivers/base/bus.c
void bus_remove_driver(struct device_driver *drv) { if (!drv->bus) return; if (!drv->suppress_bind_attrs) remove_bind_files(drv); driver_remove_groups(drv, drv->bus->drv_groups); driver_remove_file(drv, &driver_attr_uevent); klist_remove(&drv->p->knode_bus); pr_debug("bus: '%s': remove driver %s\n"...
[ 1, 0 ]
Linux Kernel
drivers/base/bus.c
static void klist_devices_get(struct klist_node *n) { struct device_private *dev_prv = to_device_private_bus(n); struct device *dev = dev_prv->device; get_device(dev); }
[ 0, 0 ]
Linux Kernel
drivers/base/bus.c
static void klist_devices_put(struct klist_node *n) { struct device_private *dev_prv = to_device_private_bus(n); struct device *dev = dev_prv->device; put_device(dev); }
[ 0, 0 ]
Linux Kernel
drivers/base/bus.c
struct kset *bus_get_kset(struct bus_type *bus) { return &bus->p->subsys; }
[ 1, 0 ]
Linux Kernel
drivers/base/bus.c
void subsys_dev_iter_init(struct subsys_dev_iter *iter, struct bus_type *subsys, struct device *start, const struct device_type *type) { struct klist_node *start_knode = NULL; if (start) start_knode = &start->p->knode_bus; klist_iter_init_node(&subsys->p->k...
[ 0, 0 ]
Linux Kernel
drivers/base/bus.c
void subsys_dev_iter_exit(struct subsys_dev_iter *iter) { klist_iter_exit(&iter->ki); }
[ 0, 0 ]
Linux Kernel
drivers/base/cacheinfo.c
bool last_level_cache_is_valid(unsigned int cpu) { struct cacheinfo *llc; if (!cache_leaves(cpu)) return false; llc = per_cpu_cacheinfo_idx(cpu, cache_leaves(cpu) - 1); return (llc->attributes & CACHE_ID) || !!llc->fw_token; }
[ 1, 0 ]
Linux Kernel
drivers/base/cacheinfo.c
static int cache_setup_of_node(unsigned int cpu) { struct device_node *np; struct cacheinfo *this_leaf; unsigned int index = 0; np = of_cpu_device_node_get(cpu); if (!np) { pr_err("Failed to find cpu%d device node\n", cpu); return -ENOENT; } while (index < cache_leaves(cpu)) { this_leaf = pe...
[ 1, 0 ]
Linux Kernel
drivers/base/cacheinfo.c
int __weak populate_cache_leaves(unsigned int cpu) { return -ENOENT; }
[ 0, 0 ]
Linux Kernel
drivers/base/cacheinfo.c
static ssize_t allocation_policy_show(struct device *dev, struct device_attribute *attr, char *buf) { struct cacheinfo *this_leaf = dev_get_drvdata(dev); unsigned int ci_attr = this_leaf->attributes; const char *output; if ((ci_attr &...
[ 1, 0 ]
Linux Kernel
drivers/base/cacheinfo.c
static umode_t cache_default_attrs_is_visible(struct kobject *kobj, struct attribute *attr, int unused) { struct device *dev = kobj_to_dev(kobj); struct cacheinfo *this_leaf = dev_get_drvdata(dev); const struct cpumask *ma...
[ 0, 0 ]
Linux Kernel
drivers/base/cacheinfo.c
static void cpu_cache_sysfs_exit(unsigned int cpu) { int i; struct device *ci_dev; if (per_cpu_index_dev(cpu)) { for (i = 0; i < cache_leaves(cpu); i++) { ci_dev = per_cache_index_dev(cpu, i); if (!ci_dev) continue; device_unregister(ci_dev); } kfree(per_cpu_index_dev(cpu));...
[ 0, 0 ]
Linux Kernel
drivers/base/cacheinfo.c
static int cacheinfo_cpu_pre_down(unsigned int cpu) { if (cpumask_test_and_clear_cpu(cpu, &cache_dev_map)) cpu_cache_sysfs_exit(cpu); free_cache_attributes(cpu); return 0; }
[ 0, 0 ]
Linux Kernel
drivers/base/class.c
static void class_release(struct kobject *kobj) { struct subsys_private *cp = to_subsys_private(kobj); struct class *class = cp->class; pr_debug("class '%s': release.\n", class->name); if (class->class_release) class->class_release(class); else pr_debug("class '%s' does not have a release() functio...
[ 0, 0 ]
Linux Kernel
drivers/base/class.c
void class_remove_file_ns(struct class *cls, const struct class_attribute *attr, const void *ns) { if (cls) sysfs_remove_file_ns(&cls->p->subsys.kobj, &attr->attr, ns); }
[ 0, 0 ]
Linux Kernel
drivers/base/class.c
static void klist_class_dev_get(struct klist_node *n) { struct device *dev = klist_class_to_dev(n); get_device(dev); }
[ 0, 0 ]
Linux Kernel
drivers/base/class.c
struct class *__class_create(struct module *owner, const char *name, struct lock_class_key *key) { struct class *cls; int retval; cls = kzalloc(sizeof(*cls), GFP_KERNEL); if (!cls) { retval = -ENOMEM; goto error; } cls->name = name; cls->owner = owner; cls->class_r...
[ 0, 0 ]
Linux Kernel
drivers/base/class.c
void class_destroy(struct class *cls) { if (IS_ERR_OR_NULL(cls)) return; class_unregister(cls); }
[ 0, 0 ]
Linux Kernel
drivers/base/class.c
struct device *class_dev_iter_next(struct class_dev_iter *iter) { struct klist_node *knode; struct device *dev; while (1) { knode = klist_next(&iter->ki); if (!knode) return NULL; dev = klist_class_to_dev(knode); if (!iter->type || iter->type == dev->type) return dev; } }
[ 1, 0 ]
Linux Kernel
drivers/base/class.c
void class_interface_unregister(struct class_interface *class_intf) { struct class *parent = class_intf->class; struct class_dev_iter iter; struct device *dev; if (!parent) return; mutex_lock(&parent->p->mutex); list_del_init(&class_intf->node); if (class_intf->remove_dev) { class_dev_iter_init...
[ 0, 0 ]
Linux Kernel
drivers/base/class.c
ssize_t show_class_attr_string(struct class *class, struct class_attribute *attr, char *buf) { struct class_attribute_string *cs; cs = container_of(attr, struct class_attribute_string, attr); return sysfs_emit(buf, "%s\n", cs->str); }
[ 0, 0 ]
Linux Kernel
drivers/base/class.c
void class_compat_unregister(struct class_compat *cls) { kobject_put(cls->kobj); kfree(cls); }
[ 0, 0 ]
Linux Kernel
drivers/base/class.c
void class_compat_remove_link(struct class_compat *cls, struct device *dev, struct device *device_link) { if (device_link) sysfs_remove_link(&dev->kobj, "device"); sysfs_remove_link(cls->kobj, dev_name(dev)); }
[ 0, 0 ]
Linux Kernel
drivers/base/component.c
static struct component *find_component(struct aggregate_device *adev, struct component_match_array *mc) { struct component *c; list_for_each_entry(c, &component_list, node) { if (c->adev && c->adev != adev) continue; if (mc->compare && mc->compare(c->dev, mc...
[ 1, 0 ]
Linux Kernel
drivers/base/component.c
static int try_to_bring_up_masters(struct component *component) { struct aggregate_device *adev; int ret = 0; list_for_each_entry(adev, &aggregate_devices, node) { if (!adev->bound) { ret = try_to_bring_up_aggregate_device(adev, component); if (ret != 0) break; } } return ret; }
[ 0, 0 ]
Linux Kernel
drivers/base/component.c
int component_compare_of(struct device *dev, void *data) { return device_match_of_node(dev, data); }
[ 0, 0 ]
Linux Kernel
drivers/base/component.c
void component_master_del(struct device *parent, const struct component_master_ops *ops) { struct aggregate_device *adev; mutex_lock(&component_mutex); adev = __aggregate_find(parent, ops); if (adev) { take_down_aggregate_device(adev); free_aggregate_device(adev); } mutex_...
[ 0, 0 ]
Linux Kernel
drivers/base/component.c
static void component_unbind(struct component *component, struct aggregate_device *adev, void *data) { WARN_ON(!component->bound); if (component->ops && component->ops->unbind) component->ops->unbind(component->dev, adev->parent, data); component->bound = false; devres_release...
[ 1, 0 ]
Linux Kernel
drivers/base/component.c
int component_add_typed(struct device *dev, const struct component_ops *ops, int subcomponent) { if (WARN_ON(subcomponent == 0)) return -EINVAL; return __component_add(dev, ops, subcomponent); }
[ 0, 0 ]
Linux Kernel
drivers/base/container.c
static int container_offline(struct device *dev) { struct container_dev *cdev = to_container_dev(dev); return cdev->offline ? cdev->offline(cdev) : 0; }
[ 0, 0 ]
Linux Kernel
drivers/base/container.c
void __init container_dev_init(void) { int ret; ret = subsys_system_register(&container_subsys, NULL); if (ret) pr_err("%s() failed: %d\n", __func__, ret); }
[ 0, 0 ]
Linux Kernel
drivers/base/core.c
static void device_link_synchronize_removal(void) { synchronize_srcu(&device_links_srcu); }
[ 0, 0 ]
Linux Kernel
drivers/base/core.c
static inline void device_links_write_unlock(void) { up_write(&device_links_lock); }
[ 0, 0 ]
Linux Kernel
drivers/base/core.c
void device_links_read_unlock(int not_used) { up_read(&device_links_lock); } #ifdef CONFIG_DEBUG_LOCK_ALLOC
[ 0, 0 ]
Linux Kernel
drivers/base/core.c
static void device_link_remove_from_lists(struct device_link *link) { list_del(&link->s_node); list_del(&link->c_node); } #endif
[ 0, 0 ]
Linux Kernel
drivers/base/core.c
static bool device_is_ancestor(struct device *dev, struct device *target) { while (target->parent) { target = target->parent; if (dev == target) return true; } return false; }
[ 0, 0 ]
Linux Kernel
drivers/base/core.c
void device_pm_move_to_tail(struct device *dev) { int idx; idx = device_links_read_lock(); device_pm_lock(); device_reorder_to_tail(dev, NULL); device_pm_unlock(); device_links_read_unlock(idx); }
[ 0, 0 ]
Linux Kernel
drivers/base/core.c
static ssize_t status_show(struct device *dev, struct device_attribute *attr, char *buf) { const char *output; switch (to_devlink(dev)->status) { case DL_STATE_NONE: output = "not tracked"; break; case DL_STATE_DORMANT: output = "dormant"; break; case DL_STATE_AVAI...
[ 0, 0 ]
Linux Kernel
drivers/base/core.c
static int devlink_add_symlinks(struct device *dev, struct class_interface *class_intf) { int ret; size_t len; struct device_link *link = to_devlink(dev); struct device *sup = link->supplier; struct device *con = link->consumer; char *buf; len = max(strlen(dev_bus_name(su...
[ 0, 0 ]
Linux Kernel
drivers/base/core.c
void device_link_remove(void *consumer, struct device *supplier) { struct device_link *link; if (WARN_ON(consumer == supplier)) return; device_links_write_lock(); list_for_each_entry(link, &supplier->links.consumers, s_node) { if (link->consumer == consumer) { device_link_put_kref(link); ...
[ 0, 0 ]
Linux Kernel
drivers/base/core.c
static void __device_links_supplier_defer_sync(struct device *sup) { if (list_empty(&sup->links.defer_sync) && dev_has_sync_state(sup)) list_add_tail(&sup->links.defer_sync, &deferred_sync); }
[ 0, 0 ]
Linux Kernel
drivers/base/core.c
u32 fw_devlink_get_flags(void) { return fw_devlink_flags; }
[ 0, 0 ]
Linux Kernel
drivers/base/core.c
bool fw_devlink_is_strict(void) { return fw_devlink_strict && !fw_devlink_is_permissive(); }
[ 0, 0 ]
Linux Kernel
drivers/base/core.c
void __init wait_for_init_devices_probe(void) { if (!fw_devlink_flags || fw_devlink_is_permissive()) return; wait_for_device_probe(); pr_info("Trying to probe devices needed for running init ...\n"); fw_devlink_best_effort = true; driver_deferred_probe_trigger(); /* * Wait for all "best effort" pr...
[ 0, 0 ]
Linux Kernel
drivers/base/core.c
static void fw_devlink_unblock_consumers(struct device *dev) { struct device_link *link; if (!fw_devlink_flags || fw_devlink_is_permissive()) return; device_links_write_lock(); list_for_each_entry(link, &dev->links.consumers, s_node) fw_devlink_relax_link(link); device_links_write_unlock(); }
[ 0, 0 ]
Linux Kernel
drivers/base/core.c
static int fw_devlink_relax_cycle(struct device *con, void *sup) { struct device_link *link; int ret; if (con == sup) return 1; ret = device_for_each_child(con, sup, fw_devlink_relax_cycle); if (ret) return ret; list_for_each_entry(link, &con->links.consumers, s_node) { if ((link->flags & ~DL...
[ 0, 0 ]
Linux Kernel
drivers/base/core.c
static void __fw_devlink_link_to_suppliers(struct device *dev, struct fwnode_handle *fwnode) { bool own_link = (dev->fwnode == fwnode); struct fwnode_link *link, *tmp; struct fwnode_handle *child = NULL; u32 dl_flags; if (own_link) dl_flags = fw_devlink_get_flag...
[ 1, 0 ]
Linux Kernel
drivers/base/core.c
static void fw_devlink_link_device(struct device *dev) { struct fwnode_handle *fwnode = dev->fwnode; if (!fw_devlink_flags) return; fw_devlink_parse_fwtree(fwnode); mutex_lock(&fwnode_link_lock); __fw_devlink_link_to_consumers(dev); __fw_devlink_link_to_suppliers(dev, fwnode); mutex_unlock(&fwnode...
[ 0, 0 ]
Linux Kernel
drivers/base/core.c
static void device_platform_notify_remove(struct device *dev) { acpi_device_notify_remove(dev); software_node_notify_remove(dev); if (platform_notify_remove) platform_notify_remove(dev); }
[ 0, 0 ]
Linux Kernel
drivers/base/core.c
static ssize_t dev_attr_show(struct kobject *kobj, struct attribute *attr, char *buf) { struct device_attribute *dev_attr = to_dev_attr(attr); struct device *dev = kobj_to_dev(kobj); ssize_t ret = -EIO; if (dev_attr->show) ret = dev_attr->show(dev, dev_attr, buf); if (ret >=...
[ 0, 0 ]
Linux Kernel
drivers/base/core.c
static ssize_t dev_attr_store(struct kobject *kobj, struct attribute *attr, const char *buf, size_t count) { struct device_attribute *dev_attr = to_dev_attr(attr); struct device *dev = kobj_to_dev(kobj); ssize_t ret = -EIO; if (dev_attr->store) ret = dev_attr->store(dev, dev_...
[ 0, 0 ]
Linux Kernel
drivers/base/core.c
static const char *dev_uevent_name(struct kobject *kobj) { struct device *dev = kobj_to_dev(kobj); if (dev->bus) return dev->bus->name; if (dev->class) return dev->class->name; return NULL; }
[ 0, 0 ]
Linux Kernel
drivers/base/core.c
static ssize_t uevent_show(struct device *dev, struct device_attribute *attr, char *buf) { struct kobject *top_kobj; struct kset *kset; struct kobj_uevent_env *env = NULL; int i; int len = 0; int retval; top_kobj = &dev->kobj; while (!top_kobj->kset && top_kobj->parent) t...
[ 1, 0 ]
Linux Kernel
drivers/base/core.c
static ssize_t online_show(struct device *dev, struct device_attribute *attr, char *buf) { bool val; device_lock(dev); val = !dev->offline; device_unlock(dev); return sysfs_emit(buf, "%u\n", val); }
[ 0, 0 ]
Linux Kernel
drivers/base/core.c
static ssize_t removable_show(struct device *dev, struct device_attribute *attr, char *buf) { const char *loc; switch (dev->removable) { case DEVICE_REMOVABLE: loc = "removable"; break; case DEVICE_FIXED: loc = "fixed"; break; default: loc = "unknown"; } ...
[ 0, 0 ]
Linux Kernel
drivers/base/core.c
int devm_device_add_groups(struct device *dev, const struct attribute_group **groups) { union device_attr_group_devres *devres; int error; devres = devres_alloc(devm_attr_groups_remove, sizeof(*devres), GFP_KERNEL); if (!devres) return -ENOMEM; error = sysfs_create_groups(&dev...
[ 1, 0 ]
Linux Kernel
drivers/base/core.c
void devm_device_remove_groups(struct device *dev, const struct attribute_group **groups) { WARN_ON(devres_release(dev, devm_attr_groups_remove, devm_attr_group_match, (void *)groups)); }
[ 0, 0 ]