Gitweb: http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=c48ea60359a303f3faf5991205b0cdb58dfe6eed Commit: c48ea60359a303f3faf5991205b0cdb58dfe6eed Parent: 5ab7ffea520948115a51a9931e1bb4c818aa8e35 Author: Dmitry Torokhov <[EMAIL PROTECTED]> AuthorDate: Wed Apr 11 01:37:18 2007 -0400 Committer: Linus Torvalds <[EMAIL PROTECTED]> CommitDate: Wed Apr 11 15:39:39 2007 -0700
[PATCH] PM: use kobject_name() to access kobject names Noone should use kobj.name directly since it may contain garbage. Objects with longer names have them stored in separately allocated memory pointed to by kobj->k_name. Signed-off-by: Dmitry Torokhov <[EMAIL PROTECTED]> Signed-off-by: Linus Torvalds <[EMAIL PROTECTED]> --- drivers/base/power/main.c | 6 ++++-- 1 files changed, 4 insertions(+), 2 deletions(-) diff --git a/drivers/base/power/main.c b/drivers/base/power/main.c index fdfa3d0..bbbb973 100644 --- a/drivers/base/power/main.c +++ b/drivers/base/power/main.c @@ -54,7 +54,8 @@ int device_pm_add(struct device * dev) int error; pr_debug("PM: Adding info for %s:%s\n", - dev->bus ? dev->bus->name : "No Bus", dev->kobj.name); + dev->bus ? dev->bus->name : "No Bus", + kobject_name(&dev->kobj)); down(&dpm_list_sem); list_add_tail(&dev->power.entry, &dpm_active); device_pm_set_parent(dev, dev->parent); @@ -67,7 +68,8 @@ int device_pm_add(struct device * dev) void device_pm_remove(struct device * dev) { pr_debug("PM: Removing info for %s:%s\n", - dev->bus ? dev->bus->name : "No Bus", dev->kobj.name); + dev->bus ? dev->bus->name : "No Bus", + kobject_name(&dev->kobj)); down(&dpm_list_sem); dpm_sysfs_remove(dev); put_device(dev->power.pm_parent); - To unsubscribe from this list: send the line "unsubscribe git-commits-head" in the body of a message to [EMAIL PROTECTED] More majordomo info at http://vger.kernel.org/majordomo-info.html