diff options
| -rw-r--r-- | drivers/extcon/extcon-class.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/drivers/extcon/extcon-class.c b/drivers/extcon/extcon-class.c index 63715cdfe988..54dc00b7b9f6 100644 --- a/drivers/extcon/extcon-class.c +++ b/drivers/extcon/extcon-class.c | |||
| @@ -570,6 +570,10 @@ static void extcon_cleanup(struct extcon_dev *edev, bool skip) | |||
| 570 | kfree(edev->cables); | 570 | kfree(edev->cables); |
| 571 | } | 571 | } |
| 572 | 572 | ||
| 573 | #if defined(CONFIG_ANDROID) | ||
| 574 | if (switch_class) | ||
| 575 | class_compat_remove_link(switch_class, edev->dev, NULL); | ||
| 576 | #endif | ||
| 573 | device_unregister(edev->dev); | 577 | device_unregister(edev->dev); |
| 574 | put_device(edev->dev); | 578 | put_device(edev->dev); |
| 575 | } | 579 | } |
