diff options
Diffstat (limited to 'drivers/extcon/extcon-class.c')
-rw-r--r-- | drivers/extcon/extcon-class.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/drivers/extcon/extcon-class.c b/drivers/extcon/extcon-class.c index 15443d3b6be1..76322330cbd7 100644 --- a/drivers/extcon/extcon-class.c +++ b/drivers/extcon/extcon-class.c | |||
@@ -792,6 +792,8 @@ void extcon_dev_unregister(struct extcon_dev *edev) | |||
792 | return; | 792 | return; |
793 | } | 793 | } |
794 | 794 | ||
795 | device_unregister(&edev->dev); | ||
796 | |||
795 | if (edev->mutually_exclusive && edev->max_supported) { | 797 | if (edev->mutually_exclusive && edev->max_supported) { |
796 | for (index = 0; edev->mutually_exclusive[index]; | 798 | for (index = 0; edev->mutually_exclusive[index]; |
797 | index++) | 799 | index++) |
@@ -812,7 +814,6 @@ void extcon_dev_unregister(struct extcon_dev *edev) | |||
812 | if (switch_class) | 814 | if (switch_class) |
813 | class_compat_remove_link(switch_class, &edev->dev, NULL); | 815 | class_compat_remove_link(switch_class, &edev->dev, NULL); |
814 | #endif | 816 | #endif |
815 | device_unregister(&edev->dev); | ||
816 | put_device(&edev->dev); | 817 | put_device(&edev->dev); |
817 | } | 818 | } |
818 | EXPORT_SYMBOL_GPL(extcon_dev_unregister); | 819 | EXPORT_SYMBOL_GPL(extcon_dev_unregister); |