diff options
author | Daniel Campello <campello@chromium.org> | 2020-01-08 09:35:20 -0700 |
---|---|---|
committer | Enric Balletbo i Serra <enric.balletbo@collabora.com> | 2020-01-10 11:42:51 +0100 |
commit | ffd7263e63fe80a39c1222a6d68e05095ed04d03 (patch) | |
tree | ca06e3d3d681787b2fd59aa8ab456bd7ea474c24 /drivers/platform | |
parent | 11f1eabee0ba0aafe023ad92d1e3c29d0a96683e (diff) | |
download | linux-ffd7263e63fe80a39c1222a6d68e05095ed04d03.tar.gz linux-ffd7263e63fe80a39c1222a6d68e05095ed04d03.tar.bz2 linux-ffd7263e63fe80a39c1222a6d68e05095ed04d03.zip |
platform/chrome: wilco_ec: Fix unregistration order
The unregistration should happen in the opposite order of
the registration, so change it accordingly.
No real issue has been noticed, but it is good practice to
keep the correct unregistration order.
Signed-off-by: Daniel Campello <campello@chromium.org>
Signed-off-by: Enric Balletbo i Serra <enric.balletbo@collabora.com>
Diffstat (limited to 'drivers/platform')
-rw-r--r-- | drivers/platform/chrome/wilco_ec/core.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/platform/chrome/wilco_ec/core.c b/drivers/platform/chrome/wilco_ec/core.c index 5210c357feef..2d5f027d8770 100644 --- a/drivers/platform/chrome/wilco_ec/core.c +++ b/drivers/platform/chrome/wilco_ec/core.c @@ -137,9 +137,9 @@ static int wilco_ec_remove(struct platform_device *pdev) { struct wilco_ec_device *ec = platform_get_drvdata(pdev); + platform_device_unregister(ec->telem_pdev); platform_device_unregister(ec->charger_pdev); wilco_ec_remove_sysfs(ec); - platform_device_unregister(ec->telem_pdev); platform_device_unregister(ec->rtc_pdev); if (ec->debugfs_pdev) platform_device_unregister(ec->debugfs_pdev); |