Loading drivers/base/attribute_container.c +1 −1 Original line number Diff line number Diff line Loading @@ -167,7 +167,7 @@ attribute_container_add_device(struct device *dev, ic->classdev.parent = get_device(dev); ic->classdev.class = cont->class; cont->class->dev_release = attribute_container_release; strcpy(ic->classdev.bus_id, dev->bus_id); dev_set_name(&ic->classdev, dev_name(dev)); if (fn) fn(cont, dev, &ic->classdev); else Loading drivers/base/bus.c +6 −6 Original line number Diff line number Diff line Loading @@ -333,7 +333,7 @@ static int match_name(struct device *dev, void *data) { const char *name = data; return sysfs_streq(name, dev->bus_id); return sysfs_streq(name, dev_name(dev)); } /** Loading Loading @@ -461,12 +461,12 @@ int bus_add_device(struct device *dev) int error = 0; if (bus) { pr_debug("bus: '%s': add device %s\n", bus->name, dev->bus_id); pr_debug("bus: '%s': add device %s\n", bus->name, dev_name(dev)); error = device_add_attrs(bus, dev); if (error) goto out_put; error = sysfs_create_link(&bus->p->devices_kset->kobj, &dev->kobj, dev->bus_id); &dev->kobj, dev_name(dev)); if (error) goto out_id; error = sysfs_create_link(&dev->kobj, Loading @@ -482,7 +482,7 @@ int bus_add_device(struct device *dev) out_deprecated: sysfs_remove_link(&dev->kobj, "subsystem"); out_subsys: sysfs_remove_link(&bus->p->devices_kset->kobj, dev->bus_id); sysfs_remove_link(&bus->p->devices_kset->kobj, dev_name(dev)); out_id: device_remove_attrs(bus, dev); out_put: Loading Loading @@ -526,13 +526,13 @@ void bus_remove_device(struct device *dev) sysfs_remove_link(&dev->kobj, "subsystem"); remove_deprecated_bus_links(dev); sysfs_remove_link(&dev->bus->p->devices_kset->kobj, dev->bus_id); dev_name(dev)); device_remove_attrs(dev->bus, dev); if (klist_node_attached(&dev->knode_bus)) klist_del(&dev->knode_bus); pr_debug("bus: '%s': remove device %s\n", dev->bus->name, dev->bus_id); dev->bus->name, dev_name(dev)); device_release_driver(dev); bus_put(dev->bus); } Loading drivers/base/core.c +18 −18 Original line number Diff line number Diff line Loading @@ -119,7 +119,7 @@ static void device_release(struct kobject *kobj) else WARN(1, KERN_ERR "Device '%s' does not have a release() " "function, it is broken and must be fixed.\n", dev->bus_id); dev_name(dev)); } static struct kobj_type device_ktype = { Loading Loading @@ -209,7 +209,7 @@ static int dev_uevent(struct kset *kset, struct kobject *kobj, retval = dev->bus->uevent(dev, env); if (retval) pr_debug("device: '%s': %s: bus uevent() returned %d\n", dev->bus_id, __func__, retval); dev_name(dev), __func__, retval); } /* have the class specific function add its stuff */ Loading @@ -217,7 +217,7 @@ static int dev_uevent(struct kset *kset, struct kobject *kobj, retval = dev->class->dev_uevent(dev, env); if (retval) pr_debug("device: '%s': %s: class uevent() " "returned %d\n", dev->bus_id, "returned %d\n", dev_name(dev), __func__, retval); } Loading @@ -226,7 +226,7 @@ static int dev_uevent(struct kset *kset, struct kobject *kobj, retval = dev->type->uevent(dev, env); if (retval) pr_debug("device: '%s': %s: dev_type uevent() " "returned %d\n", dev->bus_id, "returned %d\n", dev_name(dev), __func__, retval); } Loading Loading @@ -672,7 +672,7 @@ static int device_add_class_symlinks(struct device *dev) if (dev->kobj.parent != &dev->class->p->class_subsys.kobj && device_is_not_partition(dev)) { error = sysfs_create_link(&dev->class->p->class_subsys.kobj, &dev->kobj, dev->bus_id); &dev->kobj, dev_name(dev)); if (error) goto out_subsys; } Loading Loading @@ -712,11 +712,11 @@ static int device_add_class_symlinks(struct device *dev) if (dev->kobj.parent != &dev->class->p->class_subsys.kobj && device_is_not_partition(dev)) sysfs_remove_link(&dev->class->p->class_subsys.kobj, dev->bus_id); dev_name(dev)); #else /* link in the class directory pointing to the device */ error = sysfs_create_link(&dev->class->p->class_subsys.kobj, &dev->kobj, dev->bus_id); &dev->kobj, dev_name(dev)); if (error) goto out_subsys; Loading @@ -729,7 +729,7 @@ static int device_add_class_symlinks(struct device *dev) return 0; out_busid: sysfs_remove_link(&dev->class->p->class_subsys.kobj, dev->bus_id); sysfs_remove_link(&dev->class->p->class_subsys.kobj, dev_name(dev)); #endif out_subsys: Loading Loading @@ -758,12 +758,12 @@ static void device_remove_class_symlinks(struct device *dev) if (dev->kobj.parent != &dev->class->p->class_subsys.kobj && device_is_not_partition(dev)) sysfs_remove_link(&dev->class->p->class_subsys.kobj, dev->bus_id); dev_name(dev)); #else if (dev->parent && device_is_not_partition(dev)) sysfs_remove_link(&dev->kobj, "device"); sysfs_remove_link(&dev->class->p->class_subsys.kobj, dev->bus_id); sysfs_remove_link(&dev->class->p->class_subsys.kobj, dev_name(dev)); #endif sysfs_remove_link(&dev->kobj, "subsystem"); Loading Loading @@ -866,7 +866,7 @@ int device_add(struct device *dev) if (!strlen(dev->bus_id)) goto done; pr_debug("device: '%s': %s\n", dev->bus_id, __func__); pr_debug("device: '%s': %s\n", dev_name(dev), __func__); parent = get_device(dev->parent); setup_parent(dev, parent); Loading @@ -876,7 +876,7 @@ int device_add(struct device *dev) set_dev_node(dev, dev_to_node(parent)); /* first, register with generic layer. */ error = kobject_add(&dev->kobj, dev->kobj.parent, "%s", dev->bus_id); error = kobject_add(&dev->kobj, dev->kobj.parent, "%s", dev_name(dev)); if (error) goto Error; Loading Loading @@ -1086,7 +1086,7 @@ void device_del(struct device *dev) */ void device_unregister(struct device *dev) { pr_debug("device: '%s': %s\n", dev->bus_id, __func__); pr_debug("device: '%s': %s\n", dev_name(dev), __func__); device_del(dev); put_device(dev); } Loading Loading @@ -1199,7 +1199,7 @@ EXPORT_SYMBOL_GPL(device_remove_file); static void device_create_release(struct device *dev) { pr_debug("device: '%s': %s\n", dev->bus_id, __func__); pr_debug("device: '%s': %s\n", dev_name(dev), __func__); kfree(dev); } Loading Loading @@ -1344,7 +1344,7 @@ int device_rename(struct device *dev, char *new_name) if (!dev) return -EINVAL; pr_debug("device: '%s': %s: renaming to '%s'\n", dev->bus_id, pr_debug("device: '%s': %s: renaming to '%s'\n", dev_name(dev), __func__, new_name); #ifdef CONFIG_SYSFS_DEPRECATED Loading Loading @@ -1381,7 +1381,7 @@ int device_rename(struct device *dev, char *new_name) #else if (dev->class) { error = sysfs_create_link_nowarn(&dev->class->p->class_subsys.kobj, &dev->kobj, dev->bus_id); &dev->kobj, dev_name(dev)); if (error) goto out; sysfs_remove_link(&dev->class->p->class_subsys.kobj, Loading Loading @@ -1459,8 +1459,8 @@ int device_move(struct device *dev, struct device *new_parent) new_parent = get_device(new_parent); new_parent_kobj = get_device_parent(dev, new_parent); pr_debug("device: '%s': %s: moving to '%s'\n", dev->bus_id, __func__, new_parent ? new_parent->bus_id : "<NULL>"); pr_debug("device: '%s': %s: moving to '%s'\n", dev_name(dev), __func__, new_parent ? dev_name(new_parent) : "<NULL>"); error = kobject_move(&dev->kobj, new_parent_kobj); if (error) { cleanup_glue_dir(dev, new_parent_kobj); Loading drivers/base/dd.c +6 −6 Original line number Diff line number Diff line Loading @@ -34,7 +34,7 @@ static void driver_bound(struct device *dev) return; } pr_debug("driver: '%s': %s: bound to device '%s'\n", dev->bus_id, pr_debug("driver: '%s': %s: bound to device '%s'\n", dev_name(dev), __func__, dev->driver->name); if (dev->bus) Loading Loading @@ -104,13 +104,13 @@ static int really_probe(struct device *dev, struct device_driver *drv) atomic_inc(&probe_count); pr_debug("bus: '%s': %s: probing driver %s with device %s\n", drv->bus->name, __func__, drv->name, dev->bus_id); drv->bus->name, __func__, drv->name, dev_name(dev)); WARN_ON(!list_empty(&dev->devres_head)); dev->driver = drv; if (driver_sysfs_add(dev)) { printk(KERN_ERR "%s: driver_sysfs_add(%s) failed\n", __func__, dev->bus_id); __func__, dev_name(dev)); goto probe_failed; } Loading @@ -127,7 +127,7 @@ static int really_probe(struct device *dev, struct device_driver *drv) driver_bound(dev); ret = 1; pr_debug("bus: '%s': %s: bound device %s to driver %s\n", drv->bus->name, __func__, dev->bus_id, drv->name); drv->bus->name, __func__, dev_name(dev), drv->name); goto done; probe_failed: Loading @@ -139,7 +139,7 @@ static int really_probe(struct device *dev, struct device_driver *drv) /* driver matched but the probe failed */ printk(KERN_WARNING "%s: probe of %s failed with error %d\n", drv->name, dev->bus_id, ret); drv->name, dev_name(dev), ret); } /* * Ignore errors returned by ->probe so that the next driver can try Loading Loading @@ -194,7 +194,7 @@ int driver_probe_device(struct device_driver *drv, struct device *dev) goto done; pr_debug("bus: '%s': %s: matched device %s with driver %s\n", drv->bus->name, __func__, dev->bus_id, drv->name); drv->bus->name, __func__, dev_name(dev), drv->name); ret = really_probe(dev, drv); Loading drivers/base/firmware_class.c +1 −7 Original line number Diff line number Diff line Loading @@ -291,12 +291,6 @@ firmware_class_timeout(u_long data) fw_load_abort(fw_priv); } static inline void fw_setup_device_id(struct device *f_dev, struct device *dev) { /* XXX warning we should watch out for name collisions */ strlcpy(f_dev->bus_id, dev->bus_id, BUS_ID_SIZE); } static int fw_register_device(struct device **dev_p, const char *fw_name, struct device *device) { Loading @@ -321,7 +315,7 @@ static int fw_register_device(struct device **dev_p, const char *fw_name, fw_priv->timeout.data = (u_long) fw_priv; init_timer(&fw_priv->timeout); fw_setup_device_id(f_dev, device); dev_set_name(f_dev, dev_name(device)); f_dev->parent = device; f_dev->class = &firmware_class; dev_set_drvdata(f_dev, fw_priv); Loading Loading
drivers/base/attribute_container.c +1 −1 Original line number Diff line number Diff line Loading @@ -167,7 +167,7 @@ attribute_container_add_device(struct device *dev, ic->classdev.parent = get_device(dev); ic->classdev.class = cont->class; cont->class->dev_release = attribute_container_release; strcpy(ic->classdev.bus_id, dev->bus_id); dev_set_name(&ic->classdev, dev_name(dev)); if (fn) fn(cont, dev, &ic->classdev); else Loading
drivers/base/bus.c +6 −6 Original line number Diff line number Diff line Loading @@ -333,7 +333,7 @@ static int match_name(struct device *dev, void *data) { const char *name = data; return sysfs_streq(name, dev->bus_id); return sysfs_streq(name, dev_name(dev)); } /** Loading Loading @@ -461,12 +461,12 @@ int bus_add_device(struct device *dev) int error = 0; if (bus) { pr_debug("bus: '%s': add device %s\n", bus->name, dev->bus_id); pr_debug("bus: '%s': add device %s\n", bus->name, dev_name(dev)); error = device_add_attrs(bus, dev); if (error) goto out_put; error = sysfs_create_link(&bus->p->devices_kset->kobj, &dev->kobj, dev->bus_id); &dev->kobj, dev_name(dev)); if (error) goto out_id; error = sysfs_create_link(&dev->kobj, Loading @@ -482,7 +482,7 @@ int bus_add_device(struct device *dev) out_deprecated: sysfs_remove_link(&dev->kobj, "subsystem"); out_subsys: sysfs_remove_link(&bus->p->devices_kset->kobj, dev->bus_id); sysfs_remove_link(&bus->p->devices_kset->kobj, dev_name(dev)); out_id: device_remove_attrs(bus, dev); out_put: Loading Loading @@ -526,13 +526,13 @@ void bus_remove_device(struct device *dev) sysfs_remove_link(&dev->kobj, "subsystem"); remove_deprecated_bus_links(dev); sysfs_remove_link(&dev->bus->p->devices_kset->kobj, dev->bus_id); dev_name(dev)); device_remove_attrs(dev->bus, dev); if (klist_node_attached(&dev->knode_bus)) klist_del(&dev->knode_bus); pr_debug("bus: '%s': remove device %s\n", dev->bus->name, dev->bus_id); dev->bus->name, dev_name(dev)); device_release_driver(dev); bus_put(dev->bus); } Loading
drivers/base/core.c +18 −18 Original line number Diff line number Diff line Loading @@ -119,7 +119,7 @@ static void device_release(struct kobject *kobj) else WARN(1, KERN_ERR "Device '%s' does not have a release() " "function, it is broken and must be fixed.\n", dev->bus_id); dev_name(dev)); } static struct kobj_type device_ktype = { Loading Loading @@ -209,7 +209,7 @@ static int dev_uevent(struct kset *kset, struct kobject *kobj, retval = dev->bus->uevent(dev, env); if (retval) pr_debug("device: '%s': %s: bus uevent() returned %d\n", dev->bus_id, __func__, retval); dev_name(dev), __func__, retval); } /* have the class specific function add its stuff */ Loading @@ -217,7 +217,7 @@ static int dev_uevent(struct kset *kset, struct kobject *kobj, retval = dev->class->dev_uevent(dev, env); if (retval) pr_debug("device: '%s': %s: class uevent() " "returned %d\n", dev->bus_id, "returned %d\n", dev_name(dev), __func__, retval); } Loading @@ -226,7 +226,7 @@ static int dev_uevent(struct kset *kset, struct kobject *kobj, retval = dev->type->uevent(dev, env); if (retval) pr_debug("device: '%s': %s: dev_type uevent() " "returned %d\n", dev->bus_id, "returned %d\n", dev_name(dev), __func__, retval); } Loading Loading @@ -672,7 +672,7 @@ static int device_add_class_symlinks(struct device *dev) if (dev->kobj.parent != &dev->class->p->class_subsys.kobj && device_is_not_partition(dev)) { error = sysfs_create_link(&dev->class->p->class_subsys.kobj, &dev->kobj, dev->bus_id); &dev->kobj, dev_name(dev)); if (error) goto out_subsys; } Loading Loading @@ -712,11 +712,11 @@ static int device_add_class_symlinks(struct device *dev) if (dev->kobj.parent != &dev->class->p->class_subsys.kobj && device_is_not_partition(dev)) sysfs_remove_link(&dev->class->p->class_subsys.kobj, dev->bus_id); dev_name(dev)); #else /* link in the class directory pointing to the device */ error = sysfs_create_link(&dev->class->p->class_subsys.kobj, &dev->kobj, dev->bus_id); &dev->kobj, dev_name(dev)); if (error) goto out_subsys; Loading @@ -729,7 +729,7 @@ static int device_add_class_symlinks(struct device *dev) return 0; out_busid: sysfs_remove_link(&dev->class->p->class_subsys.kobj, dev->bus_id); sysfs_remove_link(&dev->class->p->class_subsys.kobj, dev_name(dev)); #endif out_subsys: Loading Loading @@ -758,12 +758,12 @@ static void device_remove_class_symlinks(struct device *dev) if (dev->kobj.parent != &dev->class->p->class_subsys.kobj && device_is_not_partition(dev)) sysfs_remove_link(&dev->class->p->class_subsys.kobj, dev->bus_id); dev_name(dev)); #else if (dev->parent && device_is_not_partition(dev)) sysfs_remove_link(&dev->kobj, "device"); sysfs_remove_link(&dev->class->p->class_subsys.kobj, dev->bus_id); sysfs_remove_link(&dev->class->p->class_subsys.kobj, dev_name(dev)); #endif sysfs_remove_link(&dev->kobj, "subsystem"); Loading Loading @@ -866,7 +866,7 @@ int device_add(struct device *dev) if (!strlen(dev->bus_id)) goto done; pr_debug("device: '%s': %s\n", dev->bus_id, __func__); pr_debug("device: '%s': %s\n", dev_name(dev), __func__); parent = get_device(dev->parent); setup_parent(dev, parent); Loading @@ -876,7 +876,7 @@ int device_add(struct device *dev) set_dev_node(dev, dev_to_node(parent)); /* first, register with generic layer. */ error = kobject_add(&dev->kobj, dev->kobj.parent, "%s", dev->bus_id); error = kobject_add(&dev->kobj, dev->kobj.parent, "%s", dev_name(dev)); if (error) goto Error; Loading Loading @@ -1086,7 +1086,7 @@ void device_del(struct device *dev) */ void device_unregister(struct device *dev) { pr_debug("device: '%s': %s\n", dev->bus_id, __func__); pr_debug("device: '%s': %s\n", dev_name(dev), __func__); device_del(dev); put_device(dev); } Loading Loading @@ -1199,7 +1199,7 @@ EXPORT_SYMBOL_GPL(device_remove_file); static void device_create_release(struct device *dev) { pr_debug("device: '%s': %s\n", dev->bus_id, __func__); pr_debug("device: '%s': %s\n", dev_name(dev), __func__); kfree(dev); } Loading Loading @@ -1344,7 +1344,7 @@ int device_rename(struct device *dev, char *new_name) if (!dev) return -EINVAL; pr_debug("device: '%s': %s: renaming to '%s'\n", dev->bus_id, pr_debug("device: '%s': %s: renaming to '%s'\n", dev_name(dev), __func__, new_name); #ifdef CONFIG_SYSFS_DEPRECATED Loading Loading @@ -1381,7 +1381,7 @@ int device_rename(struct device *dev, char *new_name) #else if (dev->class) { error = sysfs_create_link_nowarn(&dev->class->p->class_subsys.kobj, &dev->kobj, dev->bus_id); &dev->kobj, dev_name(dev)); if (error) goto out; sysfs_remove_link(&dev->class->p->class_subsys.kobj, Loading Loading @@ -1459,8 +1459,8 @@ int device_move(struct device *dev, struct device *new_parent) new_parent = get_device(new_parent); new_parent_kobj = get_device_parent(dev, new_parent); pr_debug("device: '%s': %s: moving to '%s'\n", dev->bus_id, __func__, new_parent ? new_parent->bus_id : "<NULL>"); pr_debug("device: '%s': %s: moving to '%s'\n", dev_name(dev), __func__, new_parent ? dev_name(new_parent) : "<NULL>"); error = kobject_move(&dev->kobj, new_parent_kobj); if (error) { cleanup_glue_dir(dev, new_parent_kobj); Loading
drivers/base/dd.c +6 −6 Original line number Diff line number Diff line Loading @@ -34,7 +34,7 @@ static void driver_bound(struct device *dev) return; } pr_debug("driver: '%s': %s: bound to device '%s'\n", dev->bus_id, pr_debug("driver: '%s': %s: bound to device '%s'\n", dev_name(dev), __func__, dev->driver->name); if (dev->bus) Loading Loading @@ -104,13 +104,13 @@ static int really_probe(struct device *dev, struct device_driver *drv) atomic_inc(&probe_count); pr_debug("bus: '%s': %s: probing driver %s with device %s\n", drv->bus->name, __func__, drv->name, dev->bus_id); drv->bus->name, __func__, drv->name, dev_name(dev)); WARN_ON(!list_empty(&dev->devres_head)); dev->driver = drv; if (driver_sysfs_add(dev)) { printk(KERN_ERR "%s: driver_sysfs_add(%s) failed\n", __func__, dev->bus_id); __func__, dev_name(dev)); goto probe_failed; } Loading @@ -127,7 +127,7 @@ static int really_probe(struct device *dev, struct device_driver *drv) driver_bound(dev); ret = 1; pr_debug("bus: '%s': %s: bound device %s to driver %s\n", drv->bus->name, __func__, dev->bus_id, drv->name); drv->bus->name, __func__, dev_name(dev), drv->name); goto done; probe_failed: Loading @@ -139,7 +139,7 @@ static int really_probe(struct device *dev, struct device_driver *drv) /* driver matched but the probe failed */ printk(KERN_WARNING "%s: probe of %s failed with error %d\n", drv->name, dev->bus_id, ret); drv->name, dev_name(dev), ret); } /* * Ignore errors returned by ->probe so that the next driver can try Loading Loading @@ -194,7 +194,7 @@ int driver_probe_device(struct device_driver *drv, struct device *dev) goto done; pr_debug("bus: '%s': %s: matched device %s with driver %s\n", drv->bus->name, __func__, dev->bus_id, drv->name); drv->bus->name, __func__, dev_name(dev), drv->name); ret = really_probe(dev, drv); Loading
drivers/base/firmware_class.c +1 −7 Original line number Diff line number Diff line Loading @@ -291,12 +291,6 @@ firmware_class_timeout(u_long data) fw_load_abort(fw_priv); } static inline void fw_setup_device_id(struct device *f_dev, struct device *dev) { /* XXX warning we should watch out for name collisions */ strlcpy(f_dev->bus_id, dev->bus_id, BUS_ID_SIZE); } static int fw_register_device(struct device **dev_p, const char *fw_name, struct device *device) { Loading @@ -321,7 +315,7 @@ static int fw_register_device(struct device **dev_p, const char *fw_name, fw_priv->timeout.data = (u_long) fw_priv; init_timer(&fw_priv->timeout); fw_setup_device_id(f_dev, device); dev_set_name(f_dev, dev_name(device)); f_dev->parent = device; f_dev->class = &firmware_class; dev_set_drvdata(f_dev, fw_priv); Loading