Commit ffd7263e authored by Daniel Campello's avatar Daniel Campello Committed by Enric Balletbo i Serra

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: default avatarDaniel Campello <campello@chromium.org>
Signed-off-by: default avatarEnric Balletbo i Serra <enric.balletbo@collabora.com>
parent 11f1eabe
...@@ -137,9 +137,9 @@ static int wilco_ec_remove(struct platform_device *pdev) ...@@ -137,9 +137,9 @@ static int wilco_ec_remove(struct platform_device *pdev)
{ {
struct wilco_ec_device *ec = platform_get_drvdata(pdev); struct wilco_ec_device *ec = platform_get_drvdata(pdev);
platform_device_unregister(ec->telem_pdev);
platform_device_unregister(ec->charger_pdev); platform_device_unregister(ec->charger_pdev);
wilco_ec_remove_sysfs(ec); wilco_ec_remove_sysfs(ec);
platform_device_unregister(ec->telem_pdev);
platform_device_unregister(ec->rtc_pdev); platform_device_unregister(ec->rtc_pdev);
if (ec->debugfs_pdev) if (ec->debugfs_pdev)
platform_device_unregister(ec->debugfs_pdev); platform_device_unregister(ec->debugfs_pdev);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment