Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 824a1bc0 authored by Peter Huewe's avatar Peter Huewe Committed by MyungJoo Ham
Browse files

extcon: unregister compat link on cleanup



Since extcon registers this compat link at device registration
(extcon_dev_register), we should probably remove them at deregistration/cleanup.

Cc: stable@vger.kernel.org
Signed-off-by: default avatarPeter Huewe <peterhuewe@gmx.de>
Signed-off-by: default avatarChanwoo Choi <cw00.choi@samsung.com>
parent 0dc77b6d
Loading
Loading
Loading
Loading
+4 −0
Original line number Diff line number Diff line
@@ -570,6 +570,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);
	}