Re: [PATCH] platform/chrome: wilco_ec: Fix unregistration order

From: Enric Balletbo i Serra
Date: Thu Jan 09 2020 - 04:06:43 EST


Hi Daniel,

Many thanks for the patch, some comments below.

On 8/1/20 17:35, Daniel Campello wrote:
> Fixes the unregistration order on the Wilco EC core driver to follow the
> christmas tree pattern.
>

It is logical to cleanup in remove's function in reverse order to probe, but
that's not related to the Christmas tree pattern. I changed the commit
description and queued for the autobuilders to play with. If all goes well will
appear in chrome-platform-5.5

> Signed-off-by: Daniel Campello <campello@xxxxxxxxxxxx>

Is this patch fixing an actual issue?

Thanks,
Enric

> ---
>
> drivers/platform/chrome/wilco_ec/core.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/platform/chrome/wilco_ec/core.c b/drivers/platform/chrome/wilco_ec/core.c
> index 5210c357feefd4..2d5f027d8770f8 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);
> --
> 2.24.1.735.g03f4e72817-goog
>