Skip to content

Commit

Permalink
platform/chrome: wilco_ec: Fix unregistration order
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Daniel Campello authored and Enric Balletbo i Serra committed Jan 10, 2020
1 parent 11f1eab commit ffd7263
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion drivers/platform/chrome/wilco_ec/core.c
Original file line number Diff line number Diff line change
@@ -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);

0 comments on commit ffd7263

Please sign in to comment.