Skip to contentSkip to conversation

Extcon: Don't try to create duplicate link names

PATCH New Mark Brown 1 participant 1 message Jun 5, 2012 External connector subsystem (extcon)

lore
Share & tools
lore

Mark Brown

author
#0 lore raw

PATCH 1/1 Extcon: Don't try to create duplicate link names

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.

---
 drivers/extcon/extcon_class.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/extcon/extcon_class.c +1 -1
index 99f7227..f6419f9 100644
@@ -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);
Signature · 1 line
1.7.10