diff options
author | Kay Sievers <kay.sievers@vrfy.org> | 2007-05-01 13:46:26 +0200 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@suse.de> | 2007-06-08 12:41:07 -0700 |
commit | 2c7afd125cc482dbdf6b0a169c42337e7e76cda5 (patch) | |
tree | d20f31d12e09e5a1305d9c274047589cf156181d /drivers/base/core.c | |
parent | adfdebceaca988515ecdb557d600fd5ab9da913a (diff) |
Driver core: keep PHYSDEV for old struct class_device
Class-devices created by "struct class_device" are going to be replaced
by "struct device". Keep the deprecated PHYSDEV* variables for the already
"deprecated" struct class_device" devices.
Signed-off-by: Kay Sievers <kay.sievers@vrfy.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Diffstat (limited to 'drivers/base/core.c')
-rw-r--r-- | drivers/base/core.c | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/drivers/base/core.c b/drivers/base/core.c index b78fc1e6826..dd40d78a023 100644 --- a/drivers/base/core.c +++ b/drivers/base/core.c @@ -180,10 +180,12 @@ static int dev_uevent(struct kset *kset, struct kobject *kobj, char **envp, const char *path; path = kobject_get_path(&parent->kobj, GFP_KERNEL); - add_uevent_var(envp, num_envp, &i, - buffer, buffer_size, &length, - "PHYSDEVPATH=%s", path); - kfree(path); + if (path) { + add_uevent_var(envp, num_envp, &i, + buffer, buffer_size, &length, + "PHYSDEVPATH=%s", path); + kfree(path); + } add_uevent_var(envp, num_envp, &i, buffer, buffer_size, &length, |