linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] staging/sm7xxfb: Convert to SIMPLE_DEV_PM_OPS
@ 2013-02-18 23:12 Peter Huewe
  2013-02-19  3:01 ` Javier Muñoz
  0 siblings, 1 reply; 2+ messages in thread
From: Peter Huewe @ 2013-02-18 23:12 UTC (permalink / raw)
  To: Teddy Wang
  Cc: Greg Kroah-Hartman, Javier M. Mellid, Devendra Naga,
	Bill Pemberton, devel, linux-kernel, Peter Huewe

Instead of assigning the pm_ops fields individually we can simply use
SIMPLE_DEV_PM_OPS.

Signed-off-by: Peter Huewe <peterhuewe@gmx.de>
---
 drivers/staging/sm7xxfb/sm7xxfb.c |   10 +---------
 1 files changed, 1 insertions(+), 9 deletions(-)

diff --git a/drivers/staging/sm7xxfb/sm7xxfb.c b/drivers/staging/sm7xxfb/sm7xxfb.c
index 0764bbb..8add64b 100644
--- a/drivers/staging/sm7xxfb/sm7xxfb.c
+++ b/drivers/staging/sm7xxfb/sm7xxfb.c
@@ -1006,15 +1006,7 @@ static int smtcfb_pci_resume(struct device *device)
 	return 0;
 }
 
-static const struct dev_pm_ops sm7xx_pm_ops = {
-	.suspend = smtcfb_pci_suspend,
-	.resume = smtcfb_pci_resume,
-	.freeze = smtcfb_pci_suspend,
-	.thaw = smtcfb_pci_resume,
-	.poweroff = smtcfb_pci_suspend,
-	.restore = smtcfb_pci_resume,
-};
-
+static SIMPLE_DEV_PM_OPS(sm7xx_pm_ops, smtcfb_pci_suspend, smtcfb_pci_resume);
 #define SM7XX_PM_OPS (&sm7xx_pm_ops)
 
 #else  /* !CONFIG_PM */
-- 
1.7.8.6


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

* Re: [PATCH] staging/sm7xxfb: Convert to SIMPLE_DEV_PM_OPS
  2013-02-18 23:12 [PATCH] staging/sm7xxfb: Convert to SIMPLE_DEV_PM_OPS Peter Huewe
@ 2013-02-19  3:01 ` Javier Muñoz
  0 siblings, 0 replies; 2+ messages in thread
From: Javier Muñoz @ 2013-02-19  3:01 UTC (permalink / raw)
  To: Peter Huewe
  Cc: Teddy Wang, Greg Kroah-Hartman, Devendra Naga, Bill Pemberton,
	devel, linux-kernel

Thanks!

Acked-by: Javier Muñoz <jmunhoz@igalia.com>

On 02/19/2013 12:12 AM, Peter Huewe wrote:
> Instead of assigning the pm_ops fields individually we can simply use
> SIMPLE_DEV_PM_OPS.
> 
> Signed-off-by: Peter Huewe <peterhuewe@gmx.de>
> ---
>  drivers/staging/sm7xxfb/sm7xxfb.c |   10 +---------
>  1 files changed, 1 insertions(+), 9 deletions(-)
> 
> diff --git a/drivers/staging/sm7xxfb/sm7xxfb.c b/drivers/staging/sm7xxfb/sm7xxfb.c
> index 0764bbb..8add64b 100644
> --- a/drivers/staging/sm7xxfb/sm7xxfb.c
> +++ b/drivers/staging/sm7xxfb/sm7xxfb.c
> @@ -1006,15 +1006,7 @@ static int smtcfb_pci_resume(struct device *device)
>  	return 0;
>  }
>  
> -static const struct dev_pm_ops sm7xx_pm_ops = {
> -	.suspend = smtcfb_pci_suspend,
> -	.resume = smtcfb_pci_resume,
> -	.freeze = smtcfb_pci_suspend,
> -	.thaw = smtcfb_pci_resume,
> -	.poweroff = smtcfb_pci_suspend,
> -	.restore = smtcfb_pci_resume,
> -};
> -
> +static SIMPLE_DEV_PM_OPS(sm7xx_pm_ops, smtcfb_pci_suspend, smtcfb_pci_resume);
>  #define SM7XX_PM_OPS (&sm7xx_pm_ops)
>  
>  #else  /* !CONFIG_PM */


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

end of thread, other threads:[~2013-02-19  3:10 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2013-02-18 23:12 [PATCH] staging/sm7xxfb: Convert to SIMPLE_DEV_PM_OPS Peter Huewe
2013-02-19  3:01 ` Javier Muñoz

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