linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] platform/chrome: wilco_ec: Fix unregistration order
@ 2020-01-08 16:35 Daniel Campello
  2020-01-09  9:06 ` Enric Balletbo i Serra
  0 siblings, 1 reply; 3+ messages in thread
From: Daniel Campello @ 2020-01-08 16:35 UTC (permalink / raw)
  To: LKML
  Cc: Daniel Campello, Enric Balletbo i Serra, Wei Yongjun,
	Duncan Laurie, Nick Crews, Benson Leung

Fixes the unregistration order on the Wilco EC core driver to follow the
christmas tree pattern.

Signed-off-by: Daniel Campello <campello@chromium.org>
---

 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


^ permalink raw reply related	[flat|nested] 3+ messages in thread

* Re: [PATCH] platform/chrome: wilco_ec: Fix unregistration order
  2020-01-08 16:35 [PATCH] platform/chrome: wilco_ec: Fix unregistration order Daniel Campello
@ 2020-01-09  9:06 ` Enric Balletbo i Serra
  2020-01-09 17:30   ` Daniel Campello
  0 siblings, 1 reply; 3+ messages in thread
From: Enric Balletbo i Serra @ 2020-01-09  9:06 UTC (permalink / raw)
  To: Daniel Campello, LKML
  Cc: Wei Yongjun, Duncan Laurie, Nick Crews, Benson Leung

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@chromium.org>

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
> 

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [PATCH] platform/chrome: wilco_ec: Fix unregistration order
  2020-01-09  9:06 ` Enric Balletbo i Serra
@ 2020-01-09 17:30   ` Daniel Campello
  0 siblings, 0 replies; 3+ messages in thread
From: Daniel Campello @ 2020-01-09 17:30 UTC (permalink / raw)
  To: Enric Balletbo i Serra
  Cc: LKML, Wei Yongjun, Duncan Laurie, Nick Crews, Benson Leung

Hi Enric,

Thanks for helping get this in.

On Thu, Jan 09, 2020 at 10:06:37AM +0100, Enric Balletbo i Serra wrote:
> 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
>
I got this confused. Thanks for pointing it out.
>
> > Signed-off-by: Daniel Campello <campello@chromium.org>
>
> Is this patch fixing an actual issue?
>
No issue, just style cleanup.
>
> 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
> >

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2020-01-09 17:30 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-01-08 16:35 [PATCH] platform/chrome: wilco_ec: Fix unregistration order Daniel Campello
2020-01-09  9:06 ` Enric Balletbo i Serra
2020-01-09 17:30   ` Daniel Campello

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).