drivers_base: platform: use always ->name for uevent
authorSebastian Andrzej Siewior <bigeasy@linutronix.de>
Mon, 15 Aug 2011 14:51:22 +0000 (16:51 +0200)
committerGreg Kroah-Hartman <gregkh@suse.de>
Tue, 23 Aug 2011 00:53:08 +0000 (17:53 -0700)
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>
drivers/base/platform.c

index 0cad9c7f6bb50f68bdb0a371e44d51530a02ec06..cd7157575e58d486ba5a720b90a01e4c56cc6f8f 100644 (file)
@@ -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;
 }
 
This page took 0.027766 seconds and 5 git commands to generate.