mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: "Rafael J. Wysocki" <rjw@sisk.pl>
To: Marek Szyprowski <m.szyprowski@samsung.com>
Cc: linux-pm@vger.kernel.org, linux-kernel@vger.kernel.org,
	Kyungmin Park <kyungmin.park@samsung.com>
Subject: Re: [PATCH] PM / Domains: fix early device initialization failure
Date: Thu, 9 Aug 2012 21:30:15 +0200	[thread overview]
Message-ID: <201208092130.15813.rjw@sisk.pl> (raw)
In-Reply-To: <1344522694-31164-1-git-send-email-m.szyprowski@samsung.com>

On Thursday, August 09, 2012, Marek Szyprowski wrote:
> dev_pm_get_subsys_data() returns 1 when a new object has been created,
> what should not be considered as an error for pm_genpd_add_device().
> 
> Signed-off-by: Marek Szyprowski <m.szyprowski@samsung.com>

This has been reported twice already and there's a patch in linux-next
to fix this issue.  And your patch is incomplete. :-)

Thanks,
Rafael


> ---
>  drivers/base/power/domain.c |    9 ++++++++-
>  1 files changed, 8 insertions(+), 1 deletions(-)
> 
> diff --git a/drivers/base/power/domain.c b/drivers/base/power/domain.c
> index ba3487c..6b61819 100644
> --- a/drivers/base/power/domain.c
> +++ b/drivers/base/power/domain.c
> @@ -1323,9 +1323,16 @@ int __pm_genpd_add_device(struct generic_pm_domain *genpd, struct device *dev,
>  		}
>  
>  	ret = dev_pm_get_subsys_data(dev);
> -	if (ret)
> +
> +	if (ret < 0)
>  		goto out;
>  
> +	/*
> +	 * dev_pm_get_subsys_data() returns 1 when new object has been created
> +	 */
> +	if (ret == 1)
> +		ret = 0;
> +
>  	genpd->device_count++;
>  	genpd->max_off_time_changed = true;
>  
> 


      reply	other threads:[~2012-08-09 19:24 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-08-09 14:31 Marek Szyprowski
2012-08-09 19:30 ` Rafael J. Wysocki [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=201208092130.15813.rjw@sisk.pl \
    --to=rjw@sisk.pl \
    --cc=kyungmin.park@samsung.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-pm@vger.kernel.org \
    --cc=m.szyprowski@samsung.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®