Since extcon registers this compat link at device registration (extcon_dev_register), we should probably remove them at deregistration/cleanup.
Cc: [email protected] Signed-off-by: Peter Huewe <[email protected]> --- drivers/extcon/extcon_class.c | 5 +++++ 1 files changed, 5 insertions(+), 0 deletions(-) diff --git a/drivers/extcon/extcon_class.c b/drivers/extcon/extcon_class.c index 6e914d0..7610b4e 100644 --- a/drivers/extcon/extcon_class.c +++ b/drivers/extcon/extcon_class.c @@ -575,6 +575,11 @@ static void extcon_cleanup(struct extcon_dev *edev, bool skip) kfree(edev->cables); } +#if defined(CONFIG_ANDROID) + if (switch_class) + ret = class_compat_remove_link(switch_class, edev->dev, + NULL); +#endif /* CONFIG_ANDROID */ device_unregister(edev->dev); put_device(edev->dev); } -- 1.7.8.6 -- To unsubscribe from this list: send the line "unsubscribe stable" in the body of a message to [email protected] More majordomo info at http://vger.kernel.org/majordomo-info.html
