Skip to content

Commit

Permalink
drivers_base: platform: use always ->name for uevent
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Sebastian Andrzej Siewior authored and Greg Kroah-Hartman committed Aug 23, 2011
1 parent 9245acd commit 0a26813
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion drivers/base/platform.c
Original file line number Diff line number Diff line change
Expand Up @@ -614,7 +614,7 @@ static int platform_uevent(struct device *dev, struct kobj_uevent_env *env)
return rc;

add_uevent_var(env, "MODALIAS=%s%s", PLATFORM_MODULE_PREFIX,
(pdev->id_entry) ? pdev->id_entry->name : pdev->name);
pdev->name);
return 0;
}

Expand Down

0 comments on commit 0a26813

Please sign in to comment.