From: mark gross <markgross@thegnar.org>
To: jean.pihet@newoldbits.com
Cc: Mark Brown <broonie@opensource.wolfsonmicro.com>,
Kevin Hilman <khilman@ti.com>,
markgross@thegnar.org,
Linux PM mailing list <linux-pm@lists.linux-foundation.org>,
linux-omap@vger.kernel.org, "Rafael J. Wysocki" <rjw@sisk.pl>,
Paul Walmsley <paul@pwsan.com>,
Magnus Damm <magnus.damm@gmail.com>,
Todd Poynor <toddpoynor@google.com>, Jean Pihet <j-pihet@ti.com>
Subject: Re: [PATCH 03/15] PM QoS: code re-organization
Date: Fri, 12 Aug 2011 19:50:39 -0700 [thread overview]
Message-ID: <20110813025039.GC639@gvim.org> (raw)
In-Reply-To: <1313075212-8366-4-git-send-email-j-pihet@ti.com>
On Thu, Aug 11, 2011 at 05:06:40PM +0200, jean.pihet@newoldbits.com wrote:
> From: Jean Pihet <j-pihet@ti.com>
>
> Move around the PM QoS misc devices management code
> for better readability.
>
> Signed-off-by: Jean Pihet <j-pihet@ti.com>
> ---
> kernel/power/qos.c | 45 +++++++++++++++++++++++----------------------
> 1 files changed, 23 insertions(+), 22 deletions(-)
>
> diff --git a/kernel/power/qos.c b/kernel/power/qos.c
> index 61275f2..fa9a090 100644
> --- a/kernel/power/qos.c
> +++ b/kernel/power/qos.c
> @@ -190,28 +190,6 @@ static void update_target(struct pm_qos_object *o, struct plist_node *node,
> NULL);
> }
>
> -static int register_pm_qos_misc(struct pm_qos_object *qos)
> -{
> - qos->pm_qos_power_miscdev.minor = MISC_DYNAMIC_MINOR;
> - qos->pm_qos_power_miscdev.name = qos->name;
> - qos->pm_qos_power_miscdev.fops = &pm_qos_power_fops;
> -
> - return misc_register(&qos->pm_qos_power_miscdev);
> -}
> -
> -static int find_pm_qos_object_by_minor(int minor)
> -{
> - int pm_qos_class;
> -
> - for (pm_qos_class = 0;
> - pm_qos_class < PM_QOS_NUM_CLASSES; pm_qos_class++) {
> - if (minor ==
> - pm_qos_array[pm_qos_class]->pm_qos_power_miscdev.minor)
> - return pm_qos_class;
> - }
> - return -1;
> -}
> -
> /**
> * pm_qos_request - returns current system wide qos expectation
> * @pm_qos_class: identification of which qos value is requested
> @@ -364,6 +342,29 @@ int pm_qos_remove_notifier(int pm_qos_class, struct notifier_block *notifier)
> }
> EXPORT_SYMBOL_GPL(pm_qos_remove_notifier);
>
> +/* User space interface to PM QoS classes via misc devices */
> +static int register_pm_qos_misc(struct pm_qos_object *qos)
> +{
> + qos->pm_qos_power_miscdev.minor = MISC_DYNAMIC_MINOR;
> + qos->pm_qos_power_miscdev.name = qos->name;
> + qos->pm_qos_power_miscdev.fops = &pm_qos_power_fops;
> +
> + return misc_register(&qos->pm_qos_power_miscdev);
> +}
> +
> +static int find_pm_qos_object_by_minor(int minor)
> +{
> + int pm_qos_class;
> +
> + for (pm_qos_class = 0;
> + pm_qos_class < PM_QOS_NUM_CLASSES; pm_qos_class++) {
> + if (minor ==
> + pm_qos_array[pm_qos_class]->pm_qos_power_miscdev.minor)
> + return pm_qos_class;
> + }
> + return -1;
> +}
> +
> static int pm_qos_power_open(struct inode *inode, struct file *filp)
> {
> long pm_qos_class;
> --
> 1.7.2.5
>
I don't see the point of this but its ok.
Acked-by:markgross <markgross@thegnar.org>
next prev parent reply other threads:[~2011-08-13 2:50 UTC|newest]
Thread overview: 43+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-08-11 15:06 [PATCH v4 00/15] PM QoS: add a per-device latency constraints class jean.pihet
2011-08-11 15:06 ` [PATCH 01/15] PM QoS: move and rename the implementation files jean.pihet
2011-08-13 2:47 ` mark gross
2011-08-11 15:06 ` [PATCH 02/15] PM QoS: minor clean-ups jean.pihet
2011-08-13 2:48 ` mark gross
2011-08-11 15:06 ` [PATCH 03/15] PM QoS: code re-organization jean.pihet
2011-08-13 2:50 ` mark gross [this message]
2011-08-11 15:06 ` [PATCH 04/15] PM QoS: re-organize data structs jean.pihet
2011-08-13 2:56 ` mark gross
2011-08-13 20:58 ` Rafael J. Wysocki
2011-08-14 8:29 ` Jean Pihet
2011-08-14 13:34 ` Rafael J. Wysocki
2011-08-11 15:06 ` [PATCH 05/15] PM QoS: generalize and export the constraints management code jean.pihet
2011-08-13 3:09 ` mark gross
2011-08-13 20:34 ` Rafael J. Wysocki
2011-08-14 8:25 ` Jean Pihet
2011-08-14 13:37 ` Rafael J. Wysocki
2011-08-16 4:08 ` mark gross
2011-08-16 6:44 ` Jean Pihet
2011-08-16 17:45 ` mark gross
2011-08-16 18:01 ` Rafael J. Wysocki
2011-08-11 15:06 ` [PATCH 06/15] PM QoS: implement the per-device PM QoS constraints jean.pihet
2011-08-13 3:16 ` mark gross
2011-08-13 21:08 ` Rafael J. Wysocki
2011-08-14 8:50 ` Jean Pihet
2011-08-14 13:51 ` Rafael J. Wysocki
2011-08-11 15:06 ` [PATCH 07/15] PM QoS: add a global notification mechanism for the device constraints jean.pihet
2011-08-14 21:50 ` Rafael J. Wysocki
2011-08-16 9:58 ` Jean Pihet
2011-08-11 15:06 ` [PATCH 08/15] OMAP: convert I2C driver to PM QoS for latency constraints jean.pihet
2011-08-11 15:06 ` [PATCH 09/15] OMAP: PM: create a PM layer plugin for per-device constraints jean.pihet
2011-08-11 15:06 ` [PATCH 10/15] OMAP2+: powerdomain: control power domains next state jean.pihet
2011-08-11 15:06 ` [PATCH 11/15] OMAP3: powerdomain data: add wake-up latency figures jean.pihet
2011-08-11 15:06 ` [PATCH 12/15] OMAP4: " jean.pihet
2011-08-11 15:06 ` [PATCH 13/15] OMAP2+: omap_hwmod: manage the wake-up latency constraints jean.pihet
2011-08-11 15:06 ` [PATCH 14/15] OMAP: PM CONSTRAINTS: implement the devices " jean.pihet
2011-08-11 15:06 ` [PATCH 15/15] OMAP2+: cpuidle only influences the MPU state jean.pihet
2011-08-12 8:02 ` [PATCH v4 00/15] PM QoS: add a per-device latency constraints class Rafael J. Wysocki
2011-08-12 11:56 ` Jean Pihet
2011-08-12 21:56 ` Rafael J. Wysocki
2011-08-14 8:51 ` Jean Pihet
2011-08-14 13:53 ` Rafael J. Wysocki
-- strict thread matches above, loose matches on Subject: below --
2011-08-16 13:43 [PATCH v5 00/15] PM QoS: add a per-device latency constraints framework jean.pihet
2011-08-16 13:43 ` [PATCH 03/15] PM QoS: code re-organization jean.pihet
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=20110813025039.GC639@gvim.org \
--to=markgross@thegnar.org \
--cc=broonie@opensource.wolfsonmicro.com \
--cc=j-pihet@ti.com \
--cc=jean.pihet@newoldbits.com \
--cc=khilman@ti.com \
--cc=linux-omap@vger.kernel.org \
--cc=linux-pm@lists.linux-foundation.org \
--cc=magnus.damm@gmail.com \
--cc=paul@pwsan.com \
--cc=rjw@sisk.pl \
--cc=toddpoynor@google.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