mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: "Rafael J. Wysocki" <rjw@sisk.pl>
To: Linux PM list <linux-pm@vger.kernel.org>
Cc: "Greg Kroah-Hartman" <gregkh@suse.de>,
	LKML <linux-kernel@vger.kernel.org>,
	Russell King <linux@arm.linux.org.uk>,
	Namhyung Kim <namhyung@gmail.com>,
	Alan Stern <stern@rowland.harvard.edu>,
	Benjamin Herrenschmidt <benh@kernel.crashing.org>
Subject: Re: [Update][PATCH 5/5] PM: Drop generic_subsys_pm_ops
Date: Thu, 15 Dec 2011 23:47:43 +0100	[thread overview]
Message-ID: <201112152347.43785.rjw@sisk.pl> (raw)
In-Reply-To: <201112152339.15825.rjw@sisk.pl>

On Thursday, December 15, 2011, Rafael J. Wysocki wrote:
> From: Rafael J. Wysocki <rjw@sisk.pl>
> 
> Since the PM core is now going to execute driver callbacks directly
> if the corresponding subsystem callbacks are not present,
> forward-only subsystem callbacks (i.e. such that only execute the
> corresponding driver callbacks) are not necessary any more.  Thus
> it is possible to remove generic_subsys_pm_ops, because the only
> callback in there that is not forward-only, .runtime_idle, is not
> really used by the only user of generic_subsys_pm_ops, which is
> vio_bus_type.
> 
> However, the generic callback routines themselves cannot be removed
> from generic_ops.c, because they are used individually by a number
> of subsystems.
> 
> Signed-off-by: Rafael J. Wysocki <rjw@sisk.pl>

Well, Ben should have a look at this one too.  Now CCed.

Thanks,
Rafael


> ---
>  arch/powerpc/kernel/vio.c        |    1 -
>  drivers/base/power/generic_ops.c |   25 -------------------------
>  include/linux/pm.h               |   13 -------------
>  3 files changed, 39 deletions(-)
> 
> Index: linux/drivers/base/power/generic_ops.c
> ===================================================================
> --- linux.orig/drivers/base/power/generic_ops.c
> +++ linux/drivers/base/power/generic_ops.c
> @@ -302,28 +302,3 @@ void pm_generic_complete(struct device *
>  	pm_runtime_idle(dev);
>  }
>  #endif /* CONFIG_PM_SLEEP */
> -
> -struct dev_pm_ops generic_subsys_pm_ops = {
> -#ifdef CONFIG_PM_SLEEP
> -	.prepare = pm_generic_prepare,
> -	.suspend = pm_generic_suspend,
> -	.suspend_noirq = pm_generic_suspend_noirq,
> -	.resume = pm_generic_resume,
> -	.resume_noirq = pm_generic_resume_noirq,
> -	.freeze = pm_generic_freeze,
> -	.freeze_noirq = pm_generic_freeze_noirq,
> -	.thaw = pm_generic_thaw,
> -	.thaw_noirq = pm_generic_thaw_noirq,
> -	.poweroff = pm_generic_poweroff,
> -	.poweroff_noirq = pm_generic_poweroff_noirq,
> -	.restore = pm_generic_restore,
> -	.restore_noirq = pm_generic_restore_noirq,
> -	.complete = pm_generic_complete,
> -#endif
> -#ifdef CONFIG_PM_RUNTIME
> -	.runtime_suspend = pm_generic_runtime_suspend,
> -	.runtime_resume = pm_generic_runtime_resume,
> -	.runtime_idle = pm_generic_runtime_idle,
> -#endif
> -};
> -EXPORT_SYMBOL_GPL(generic_subsys_pm_ops);
> Index: linux/include/linux/pm.h
> ===================================================================
> --- linux.orig/include/linux/pm.h
> +++ linux/include/linux/pm.h
> @@ -300,19 +300,6 @@ const struct dev_pm_ops name = { \
>  	SET_RUNTIME_PM_OPS(suspend_fn, resume_fn, idle_fn) \
>  }
>  
> -/*
> - * Use this for subsystems (bus types, device types, device classes) that don't
> - * need any special suspend/resume handling in addition to invoking the PM
> - * callbacks provided by device drivers supporting both the system sleep PM and
> - * runtime PM, make the pm member point to generic_subsys_pm_ops.
> - */
> -#ifdef CONFIG_PM
> -extern struct dev_pm_ops generic_subsys_pm_ops;
> -#define GENERIC_SUBSYS_PM_OPS	(&generic_subsys_pm_ops)
> -#else
> -#define GENERIC_SUBSYS_PM_OPS	NULL
> -#endif
> -
>  /**
>   * PM_EVENT_ messages
>   *
> Index: linux/arch/powerpc/kernel/vio.c
> ===================================================================
> --- linux.orig/arch/powerpc/kernel/vio.c
> +++ linux/arch/powerpc/kernel/vio.c
> @@ -1406,7 +1406,6 @@ static struct bus_type vio_bus_type = {
>  	.match = vio_bus_match,
>  	.probe = vio_bus_probe,
>  	.remove = vio_bus_remove,
> -	.pm = GENERIC_SUBSYS_PM_OPS,
>  };
>  
>  /**
> 
> --
> To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html
> Please read the FAQ at  http://www.tux.org/lkml/
> 
> 


  reply	other threads:[~2011-12-15 22:44 UTC|newest]

Thread overview: 20+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-12-09 23:18 [PATCH 0/4] PM: Make the PM core execute driver callbacks if subsystem ones are not present Rafael J. Wysocki
2011-12-09 23:20 ` [PATCH 1/4] PM / Sleep: Make pm_op() and pm_noirq_op() return callback pointers Rafael J. Wysocki
2011-12-12  4:04   ` Namhyung Kim
2011-12-12 23:53     ` Rafael J. Wysocki
2011-12-13 13:55       ` Namhyung Kim
2011-12-09 23:20 ` [PATCH 2/4] PM: Run the driver callback directly if the subsystem one is not there Rafael J. Wysocki
2011-12-10 14:59   ` Alan Stern
2011-12-10 18:21     ` Rafael J. Wysocki
2011-12-09 23:21 ` [PATCH 3/4] PM / Sleep: Remove forward-only callbacks from platform bus type Rafael J. Wysocki
2011-12-09 23:23 ` [PATCH 4/4] PM / Sleep: Remove forward-only callbacks from AMBA " Rafael J. Wysocki
2011-12-09 23:47 ` [PATCH 0/4] PM: Make the PM core execute driver callbacks if subsystem ones are not present Greg KH
2011-12-09 23:52   ` Rafael J. Wysocki
2011-12-15 22:34 ` [Update][PATCH 0/5] " Rafael J. Wysocki
2011-12-15 22:35   ` [Update][PATCH 1/5] PM / Sleep: Make pm_op() and pm_noirq_op() return callback pointers Rafael J. Wysocki
2011-12-15 22:36   ` [Update][PATCH 2/5] PM: Run the driver callback directly if the subsystem one is not there Rafael J. Wysocki
2011-12-15 22:37   ` [Update][PATCH 3/5] PM / Sleep: Remove forward-only callbacks from platform bus type Rafael J. Wysocki
2011-12-15 22:38   ` [Update][PATCH 4/5] PM / Sleep: Remove forward-only callbacks from AMBA " Rafael J. Wysocki
2011-12-15 22:39   ` [Update][PATCH 5/5] PM: Drop generic_subsys_pm_ops Rafael J. Wysocki
2011-12-15 22:47     ` Rafael J. Wysocki [this message]
2011-12-15 23:08   ` [Update][PATCH 0/5] PM: Make the PM core execute driver callbacks if subsystem ones are not present Greg KH

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=201112152347.43785.rjw@sisk.pl \
    --to=rjw@sisk.pl \
    --cc=benh@kernel.crashing.org \
    --cc=gregkh@suse.de \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-pm@vger.kernel.org \
    --cc=linux@arm.linux.org.uk \
    --cc=namhyung@gmail.com \
    --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

Powered by JetHome