Message ID | 1353949160-26803-210-git-send-email-herton.krzesinski@canonical.com |
---|---|
State | New |
Headers | show |
diff --git a/drivers/extcon/extcon_class.c b/drivers/extcon/extcon_class.c index 01bac36..0a710b0 100644 --- a/drivers/extcon/extcon_class.c +++ b/drivers/extcon/extcon_class.c @@ -575,6 +575,10 @@ static void extcon_cleanup(struct extcon_dev *edev, bool skip) kfree(edev->cables); } +#if defined(CONFIG_ANDROID) + if (switch_class) + class_compat_remove_link(switch_class, edev->dev, NULL); +#endif device_unregister(edev->dev); put_device(edev->dev); }