Extcon: Don't try to create duplicate link names
Syed Rafiuddin [Mon, 3 Sep 2012 11:37:44 +0000 (16:37 +0530)]
We can't create a link from the device to the compatibility switch class
since we already create a link from the device to to the extcon class
object and we try to use the same name for both links. This causes a loud
complaint from sysfs on boot.

(cherry picked from commit c3b15452e253ab0629cd9e400d3fb6d76c76cb73)

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

Change-Id: I54d35756be2757f63d616f3f9cafd24d416ab8cc
Signed-off-by: Syed Rafiuddin <srafiuddin@nvidia.com>
Reviewed-on: http://git-master/r/130617
Reviewed-by: Automatic_Commit_Validation_User
Reviewed-by: Laxman Dewangan <ldewangan@nvidia.com>

drivers/extcon/extcon_class.c

index 99f7227..f6419f9 100644 (file)
@@ -762,7 +762,7 @@ int extcon_dev_register(struct extcon_dev *edev, struct device *dev)
 #if defined(CONFIG_ANDROID)
        if (switch_class)
                ret = class_compat_create_link(switch_class, edev->dev,
-                                              dev);
+                                              NULL);
 #endif /* CONFIG_ANDROID */
 
        spin_lock_init(&edev->lock);