linux-pci.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] PCI/PM: Removing the function pci_pm_complete()
@ 2013-09-10 10:46 Chuansheng Liu
  2013-10-04 17:47 ` Bjorn Helgaas
  2013-10-07 21:33 ` Bjorn Helgaas
  0 siblings, 2 replies; 4+ messages in thread
From: Chuansheng Liu @ 2013-09-10 10:46 UTC (permalink / raw)
  To: stern, rjw, bhelgaas; +Cc: linux-pci, linux-kernel, chuansheng.liu, fei.li


Commit(88d2613) removed the pm_runtime_put_sync() from pci_pm_complete()
to PM core code device_complete().

Here the pci_pm_complete() is doing the same work which can be done in
device_complete(), so we can remove it directly.

Signed-off-by: liu chuansheng <chuansheng.liu@intel.com>
---
 drivers/pci/pci-driver.c |    9 ---------
 1 files changed, 0 insertions(+), 9 deletions(-)

diff --git a/drivers/pci/pci-driver.c b/drivers/pci/pci-driver.c
index 98f7b9b..736ef3f 100644
--- a/drivers/pci/pci-driver.c
+++ b/drivers/pci/pci-driver.c
@@ -599,18 +599,10 @@ static int pci_pm_prepare(struct device *dev)
 	return error;
 }
 
-static void pci_pm_complete(struct device *dev)
-{
-	struct device_driver *drv = dev->driver;
-
-	if (drv && drv->pm && drv->pm->complete)
-		drv->pm->complete(dev);
-}
 
 #else /* !CONFIG_PM_SLEEP */
 
 #define pci_pm_prepare	NULL
-#define pci_pm_complete	NULL
 
 #endif /* !CONFIG_PM_SLEEP */
 
@@ -1123,7 +1115,6 @@ static int pci_pm_runtime_idle(struct device *dev)
 
 const struct dev_pm_ops pci_dev_pm_ops = {
 	.prepare = pci_pm_prepare,
-	.complete = pci_pm_complete,
 	.suspend = pci_pm_suspend,
 	.resume = pci_pm_resume,
 	.freeze = pci_pm_freeze,
-- 
1.7.0.4




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

* Re: [PATCH] PCI/PM: Removing the function pci_pm_complete()
  2013-09-10 10:46 [PATCH] PCI/PM: Removing the function pci_pm_complete() Chuansheng Liu
@ 2013-10-04 17:47 ` Bjorn Helgaas
  2013-10-05 22:47   ` Rafael J. Wysocki
  2013-10-07 21:33 ` Bjorn Helgaas
  1 sibling, 1 reply; 4+ messages in thread
From: Bjorn Helgaas @ 2013-10-04 17:47 UTC (permalink / raw)
  To: Chuansheng Liu
  Cc: Alan Stern, Rafael J. Wysocki, linux-pci@vger.kernel.org,
	linux-kernel@vger.kernel.org, fei.li

On Tue, Sep 10, 2013 at 4:46 AM, Chuansheng Liu
<chuansheng.liu@intel.com> wrote:
>
> Commit(88d2613) removed the pm_runtime_put_sync() from pci_pm_complete()
> to PM core code device_complete().
>
> Here the pci_pm_complete() is doing the same work which can be done in
> device_complete(), so we can remove it directly.
>
> Signed-off-by: liu chuansheng <chuansheng.liu@intel.com>
> ---
>  drivers/pci/pci-driver.c |    9 ---------
>  1 files changed, 0 insertions(+), 9 deletions(-)

This looks correct to me, but I'd like Rafael to ack it before I apply it.

> diff --git a/drivers/pci/pci-driver.c b/drivers/pci/pci-driver.c
> index 98f7b9b..736ef3f 100644
> --- a/drivers/pci/pci-driver.c
> +++ b/drivers/pci/pci-driver.c
> @@ -599,18 +599,10 @@ static int pci_pm_prepare(struct device *dev)
>         return error;
>  }
>
> -static void pci_pm_complete(struct device *dev)
> -{
> -       struct device_driver *drv = dev->driver;
> -
> -       if (drv && drv->pm && drv->pm->complete)
> -               drv->pm->complete(dev);
> -}
>
>  #else /* !CONFIG_PM_SLEEP */
>
>  #define pci_pm_prepare NULL
> -#define pci_pm_complete        NULL
>
>  #endif /* !CONFIG_PM_SLEEP */
>
> @@ -1123,7 +1115,6 @@ static int pci_pm_runtime_idle(struct device *dev)
>
>  const struct dev_pm_ops pci_dev_pm_ops = {
>         .prepare = pci_pm_prepare,
> -       .complete = pci_pm_complete,
>         .suspend = pci_pm_suspend,
>         .resume = pci_pm_resume,
>         .freeze = pci_pm_freeze,
> --
> 1.7.0.4
>
>
>

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

* Re: [PATCH] PCI/PM: Removing the function pci_pm_complete()
  2013-10-04 17:47 ` Bjorn Helgaas
@ 2013-10-05 22:47   ` Rafael J. Wysocki
  0 siblings, 0 replies; 4+ messages in thread
From: Rafael J. Wysocki @ 2013-10-05 22:47 UTC (permalink / raw)
  To: Bjorn Helgaas
  Cc: Chuansheng Liu, Alan Stern, linux-pci@vger.kernel.org,
	linux-kernel@vger.kernel.org, fei.li

On Friday, October 04, 2013 11:47:25 AM Bjorn Helgaas wrote:
> On Tue, Sep 10, 2013 at 4:46 AM, Chuansheng Liu
> <chuansheng.liu@intel.com> wrote:
> >
> > Commit(88d2613) removed the pm_runtime_put_sync() from pci_pm_complete()
> > to PM core code device_complete().
> >
> > Here the pci_pm_complete() is doing the same work which can be done in
> > device_complete(), so we can remove it directly.
> >
> > Signed-off-by: liu chuansheng <chuansheng.liu@intel.com>
> > ---
> >  drivers/pci/pci-driver.c |    9 ---------
> >  1 files changed, 0 insertions(+), 9 deletions(-)
> 
> This looks correct to me, but I'd like Rafael to ack it before I apply it.

Yes, it should work, so ACK.

Sorry for the delay.

> > diff --git a/drivers/pci/pci-driver.c b/drivers/pci/pci-driver.c
> > index 98f7b9b..736ef3f 100644
> > --- a/drivers/pci/pci-driver.c
> > +++ b/drivers/pci/pci-driver.c
> > @@ -599,18 +599,10 @@ static int pci_pm_prepare(struct device *dev)
> >         return error;
> >  }
> >
> > -static void pci_pm_complete(struct device *dev)
> > -{
> > -       struct device_driver *drv = dev->driver;
> > -
> > -       if (drv && drv->pm && drv->pm->complete)
> > -               drv->pm->complete(dev);
> > -}
> >
> >  #else /* !CONFIG_PM_SLEEP */
> >
> >  #define pci_pm_prepare NULL
> > -#define pci_pm_complete        NULL
> >
> >  #endif /* !CONFIG_PM_SLEEP */
> >
> > @@ -1123,7 +1115,6 @@ static int pci_pm_runtime_idle(struct device *dev)
> >
> >  const struct dev_pm_ops pci_dev_pm_ops = {
> >         .prepare = pci_pm_prepare,
> > -       .complete = pci_pm_complete,
> >         .suspend = pci_pm_suspend,
> >         .resume = pci_pm_resume,
> >         .freeze = pci_pm_freeze,
> > --
> > 1.7.0.4

Thanks!

-- 
I speak only for myself.
Rafael J. Wysocki, Intel Open Source Technology Center.

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

* Re: [PATCH] PCI/PM: Removing the function pci_pm_complete()
  2013-09-10 10:46 [PATCH] PCI/PM: Removing the function pci_pm_complete() Chuansheng Liu
  2013-10-04 17:47 ` Bjorn Helgaas
@ 2013-10-07 21:33 ` Bjorn Helgaas
  1 sibling, 0 replies; 4+ messages in thread
From: Bjorn Helgaas @ 2013-10-07 21:33 UTC (permalink / raw)
  To: Chuansheng Liu
  Cc: Alan Stern, Rafael J. Wysocki, linux-pci@vger.kernel.org,
	linux-kernel@vger.kernel.org, fei.li

On Tue, Sep 10, 2013 at 4:46 AM, Chuansheng Liu
<chuansheng.liu@intel.com> wrote:
>
> Commit(88d2613) removed the pm_runtime_put_sync() from pci_pm_complete()
> to PM core code device_complete().
>
> Here the pci_pm_complete() is doing the same work which can be done in
> device_complete(), so we can remove it directly.
>
> Signed-off-by: liu chuansheng <chuansheng.liu@intel.com>

Applied to pci/misc with Rafaels' ack, for v3.13.  Thanks!

Bjorn

> ---
>  drivers/pci/pci-driver.c |    9 ---------
>  1 files changed, 0 insertions(+), 9 deletions(-)
>
> diff --git a/drivers/pci/pci-driver.c b/drivers/pci/pci-driver.c
> index 98f7b9b..736ef3f 100644
> --- a/drivers/pci/pci-driver.c
> +++ b/drivers/pci/pci-driver.c
> @@ -599,18 +599,10 @@ static int pci_pm_prepare(struct device *dev)
>         return error;
>  }
>
> -static void pci_pm_complete(struct device *dev)
> -{
> -       struct device_driver *drv = dev->driver;
> -
> -       if (drv && drv->pm && drv->pm->complete)
> -               drv->pm->complete(dev);
> -}
>
>  #else /* !CONFIG_PM_SLEEP */
>
>  #define pci_pm_prepare NULL
> -#define pci_pm_complete        NULL
>
>  #endif /* !CONFIG_PM_SLEEP */
>
> @@ -1123,7 +1115,6 @@ static int pci_pm_runtime_idle(struct device *dev)
>
>  const struct dev_pm_ops pci_dev_pm_ops = {
>         .prepare = pci_pm_prepare,
> -       .complete = pci_pm_complete,
>         .suspend = pci_pm_suspend,
>         .resume = pci_pm_resume,
>         .freeze = pci_pm_freeze,
> --
> 1.7.0.4
>
>
>

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

end of thread, other threads:[~2013-10-07 21:33 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-09-10 10:46 [PATCH] PCI/PM: Removing the function pci_pm_complete() Chuansheng Liu
2013-10-04 17:47 ` Bjorn Helgaas
2013-10-05 22:47   ` Rafael J. Wysocki
2013-10-07 21:33 ` Bjorn Helgaas

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).