diff options
author | Sebastian Andrzej Siewior <bigeasy@linutronix.de> | 2011-08-15 10:51:22 -0400 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@suse.de> | 2011-08-22 20:53:08 -0400 |
commit | 0a26813c9f528f17901b2f2394fba8557d2c9485 (patch) | |
tree | a90242c302855c56763f9d46bc643cec2e02c8cc | |
parent | 9245acd20d58d5a9a3ed5ebf8c486e0609027817 (diff) |
drivers_base: platform: use always ->name for uevent
If id_entry is available then it is used. However if we remove first the
driver followed by the device, then the id_entry is pointing to driver's
memory which is long gone.
Since id->name and plat->name are equal there is no point in
distinguishing them.
Cc: Grant Likely <grant.likely@secretlab.ca>
Cc: linux-kernel@vger.kernel.org
Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
-rw-r--r-- | drivers/base/platform.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/base/platform.c b/drivers/base/platform.c index 0cad9c7f6bb5..cd7157575e58 100644 --- a/drivers/base/platform.c +++ b/drivers/base/platform.c | |||
@@ -614,7 +614,7 @@ static int platform_uevent(struct device *dev, struct kobj_uevent_env *env) | |||
614 | return rc; | 614 | return rc; |
615 | 615 | ||
616 | add_uevent_var(env, "MODALIAS=%s%s", PLATFORM_MODULE_PREFIX, | 616 | add_uevent_var(env, "MODALIAS=%s%s", PLATFORM_MODULE_PREFIX, |
617 | (pdev->id_entry) ? pdev->id_entry->name : pdev->name); | 617 | pdev->name); |
618 | return 0; | 618 | return 0; |
619 | } | 619 | } |
620 | 620 | ||