public inbox for linux-pm@vger.kernel.org
 help / color / mirror / Atom feed
From: "Rafael J. Wysocki" <rjw@sisk.pl>
To: Alan Stern <stern@rowland.harvard.edu>
Cc: Linux-pm mailing list <linux-pm@lists.linux-foundation.org>
Subject: Re: [RFC 5/7] PM: combine runtime PM entry points
Date: Fri, 24 Sep 2010 00:36:04 +0200	[thread overview]
Message-ID: <201009240036.04207.rjw@sisk.pl> (raw)
In-Reply-To: <Pine.LNX.4.44L0.1009231719570.1667-100000@iolanthe.rowland.org>

On Thursday, September 23, 2010, Alan Stern wrote:
> This patch (as1424) combines the various public entry points for the
> runtime PM routines into three simple functions: one for idle, one for
> suspend, and one for resume.  A new bitflag specifies whether or not
> to increment or decrement the usage_count field.
> 
> Signed-off-by: Alan Stern <stern@rowland.harvard.edu>
> 
> ---
> 
> Index: usb-2.6/include/linux/pm_runtime.h
> ===================================================================
> --- usb-2.6.orig/include/linux/pm_runtime.h
> +++ usb-2.6/include/linux/pm_runtime.h
> @@ -16,19 +16,17 @@
>  #define RPM_ASYNC			0x01	/* Request is asynchronous */
>  #define RPM_RETURN_IF_IN_PROGRESS	0x02	/* Don't wait for concurrent
>  						    state change */
> +#define RPM_GET_PUT			0x04	/* Increment/decrement the
> +						    usage_count */
>  
>  #ifdef CONFIG_PM_RUNTIME
>  
>  extern struct workqueue_struct *pm_wq;
>  
> -extern int pm_runtime_idle(struct device *dev);
> -extern int pm_runtime_suspend(struct device *dev);
> -extern int pm_runtime_resume(struct device *dev);
> -extern int pm_request_idle(struct device *dev);
> +extern int pm_runtime_idle_entry(struct device *dev, int rpmflags);
> +extern int pm_runtime_suspend_entry(struct device *dev, int rpmflags);
> +extern int pm_runtime_resume_entry(struct device *dev, int rpmflags);

Hmm.  Since you're renaming everything anyway, why not to give new names to the
new merged routines in [4/7], like rpm_idle(), rpm_suspend(), rpm_resume() and 
call the new entry points __pm_runtime_idle(), __pm_runtime_suspen() and
__pm_runtime_resume()?  [I don't really like the _entry part.]  That would
match the general naming convention used in such cases.

Thanks,
Rafael

      reply	other threads:[~2010-09-23 22:36 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-09-23 21:23 [RFC 5/7] PM: combine runtime PM entry points Alan Stern
2010-09-23 22:36 ` 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=201009240036.04207.rjw@sisk.pl \
    --to=rjw@sisk.pl \
    --cc=linux-pm@lists.linux-foundation.org \
    --cc=stern@rowland.harvard.edu \
    /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