All of lore.kernel.org
 help / color / mirror / Atom feed
From: Rusty Russell <rusty@rustcorp.com.au>
Cc: 'Jingoo Han' <jg1.han@samsung.com>,
	virtualization@lists.linux-foundation.org,
	"'Michael S. Tsirkin'" <mst@redhat.com>
Subject: Re: [PATCH] virtio: pci: Use SIMPLE_DEV_PM_OPS macro
Date: Tue, 09 Sep 2014 09:43:42 +0930	[thread overview]
Message-ID: <8761gxk5vt.fsf@rustcorp.com.au> (raw)
In-Reply-To: <003a01cfc8bc$bf48cd60$3dda6820$%han@samsung.com>

Jingoo Han <jg1.han@samsung.com> writes:
> Use SIMPLE_DEV_PM_OPS macro in order to make the code simpler.
>
> Signed-off-by: Jingoo Han <jg1.han@samsung.com>

This patch is obviously wrong.  It won't compile without
CONFIG_PM_SLEEP.

Cheers,
Rusty.

> ---
>  drivers/virtio/virtio_pci.c | 9 +++------
>  1 file changed, 3 insertions(+), 6 deletions(-)
>
> diff --git a/drivers/virtio/virtio_pci.c b/drivers/virtio/virtio_pci.c
> index 3d1463c6b120..c5fbdb4023d1 100644
> --- a/drivers/virtio/virtio_pci.c
> +++ b/drivers/virtio/virtio_pci.c
> @@ -810,20 +810,17 @@ static int virtio_pci_restore(struct device *dev)
>  
>  	return ret;
>  }
> -
> -static const struct dev_pm_ops virtio_pci_pm_ops = {
> -	SET_SYSTEM_SLEEP_PM_OPS(virtio_pci_freeze, virtio_pci_restore)
> -};
>  #endif
>  
> +static SIMPLE_DEV_PM_OPS(virtio_pci_pm_ops, virtio_pci_freeze,
> +			 virtio_pci_restore);
> +
>  static struct pci_driver virtio_pci_driver = {
>  	.name		= "virtio-pci",
>  	.id_table	= virtio_pci_id_table,
>  	.probe		= virtio_pci_probe,
>  	.remove		= virtio_pci_remove,
> -#ifdef CONFIG_PM_SLEEP
>  	.driver.pm	= &virtio_pci_pm_ops,
> -#endif
>  };
>  
>  module_pci_driver(virtio_pci_driver);
> -- 
> 2.0.0

  reply	other threads:[~2014-09-09  0:13 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-09-05  3:52 [PATCH] virtio: pci: Use SIMPLE_DEV_PM_OPS macro Jingoo Han
2014-09-09  0:13 ` Rusty Russell [this message]
2014-09-17  9:52   ` Jingoo Han
2014-09-18  5:23     ` Rusty Russell
2014-10-05 15:49       ` Michael S. Tsirkin

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=8761gxk5vt.fsf@rustcorp.com.au \
    --to=rusty@rustcorp.com.au \
    --cc=jg1.han@samsung.com \
    --cc=mst@redhat.com \
    --cc=virtualization@lists.linux-foundation.org \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.