All of lore.kernel.org
 help / color / mirror / Atom feed
From: Takashi Iwai <tiwai@suse.de>
To: linux-sound@vger.kernel.org
Subject: [PATCH 04/29] ALSA: als300: Replace with DEFINE_SIMPLE_DEV_PM_OPS()
Date: Wed,  7 Feb 2024 16:51:15 +0100	[thread overview]
Message-ID: <20240207155140.18238-5-tiwai@suse.de> (raw)
In-Reply-To: <20240207155140.18238-1-tiwai@suse.de>

Use the	new DEFINE_SIMPLE_DEV_PM_OPS() instead of SIMPLE_DEV_PM_OPS()
for code-simplification.  We need no longer CONFIG_PM_SLEEP ifdefs.
Just a cleanup, no functional changes.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
---
 sound/pci/als300.c | 9 ++-------
 1 file changed, 2 insertions(+), 7 deletions(-)

diff --git a/sound/pci/als300.c b/sound/pci/als300.c
index c70aff060120..c7c481203ef8 100644
--- a/sound/pci/als300.c
+++ b/sound/pci/als300.c
@@ -654,7 +654,6 @@ static int snd_als300_create(struct snd_card *card,
 	return 0;
 }
 
-#ifdef CONFIG_PM_SLEEP
 static int snd_als300_suspend(struct device *dev)
 {
 	struct snd_card *card = dev_get_drvdata(dev);
@@ -677,11 +676,7 @@ static int snd_als300_resume(struct device *dev)
 	return 0;
 }
 
-static SIMPLE_DEV_PM_OPS(snd_als300_pm, snd_als300_suspend, snd_als300_resume);
-#define SND_ALS300_PM_OPS	&snd_als300_pm
-#else
-#define SND_ALS300_PM_OPS	NULL
-#endif
+static DEFINE_SIMPLE_DEV_PM_OPS(snd_als300_pm, snd_als300_suspend, snd_als300_resume);
 
 static int snd_als300_probe(struct pci_dev *pci,
                              const struct pci_device_id *pci_id)
@@ -739,7 +734,7 @@ static struct pci_driver als300_driver = {
 	.id_table = snd_als300_ids,
 	.probe = snd_als300_probe,
 	.driver = {
-		.pm = SND_ALS300_PM_OPS,
+		.pm = &snd_als300_pm,
 	},
 };
 
-- 
2.35.3


  parent reply	other threads:[~2024-02-07 15:52 UTC|newest]

Thread overview: 30+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-02-07 15:51 [PATCH 00/29] ALSA: Clean up with DEFINE_SIMPLE_DEV_PM_OPS() Takashi Iwai
2024-02-07 15:51 ` [PATCH 01/29] ALSA: aloop: Replace " Takashi Iwai
2024-02-07 15:51 ` [PATCH 02/29] ALSA: dummy: Replace with DEFINE_SIPMLE_DEV_PM_OPS() Takashi Iwai
2024-02-07 15:51 ` [PATCH 03/29] ALSA: pcsp: Replace with DEFINE_SIMPLE_DEV_PM_OPS() Takashi Iwai
2024-02-07 15:51 ` Takashi Iwai [this message]
2024-02-07 15:51 ` [PATCH 05/29] ALSA: als4000: " Takashi Iwai
2024-02-07 15:51 ` [PATCH 06/29] ALSA: atiixp: " Takashi Iwai
2024-02-07 15:51 ` [PATCH 07/29] ALSA: ens137x: " Takashi Iwai
2024-02-07 15:51 ` [PATCH 08/29] ALSA: intel8x0: " Takashi Iwai
2024-02-07 15:51 ` [PATCH 09/29] ALSA: nm256: " Takashi Iwai
2024-02-07 15:51 ` [PATCH 10/29] ALSA: aoa: " Takashi Iwai
2024-02-07 15:51 ` [PATCH 11/29] ALSA: aaci: " Takashi Iwai
2024-02-07 15:51 ` [PATCH 12/29] ALSA: pxa2xx-ac97: " Takashi Iwai
2024-02-07 15:51 ` [PATCH 13/29] ASoC: " Takashi Iwai
2024-02-07 15:51 ` [PATCH 14/29] ALSA: at73c213: " Takashi Iwai
2024-02-07 15:51 ` [PATCH 15/29] ALSA: ali5451: Embed suspend image into struct snd_ali Takashi Iwai
2024-02-07 15:51 ` [PATCH 16/29] ALSA: ali5451: Simplify with DEFINE_SIMPLE_DEV_PM_OPS() Takashi Iwai
2024-02-07 15:51 ` [PATCH 17/29] ALSA: azt3328: " Takashi Iwai
2024-02-07 15:51 ` [PATCH 18/29] ALSA: cmipci: " Takashi Iwai
2024-02-07 15:51 ` [PATCH 19/29] ALSA: cs4281: " Takashi Iwai
2024-02-07 15:51 ` [PATCH 20/29] ALSA: echoaudio: " Takashi Iwai
2024-02-07 15:51 ` [PATCH 21/29] ALSA: es1938: " Takashi Iwai
2024-02-07 15:51 ` [PATCH 22/29] ALSA: es1968: " Takashi Iwai
2024-02-07 15:51 ` [PATCH 23/29] ALSA: fm801: " Takashi Iwai
2024-02-07 15:51 ` [PATCH 24/29] ALSA: maestro3: " Takashi Iwai
2024-02-07 15:51 ` [PATCH 25/29] ALSA: riptide: " Takashi Iwai
2024-02-07 15:51 ` [PATCH 26/29] ALSA: rme96: " Takashi Iwai
2024-02-07 15:51 ` [PATCH 27/29] ALSA: sis7019: " Takashi Iwai
2024-02-07 15:51 ` [PATCH 28/29] ALSA: via82xx: " Takashi Iwai
2024-02-07 15:51 ` [PATCH 29/29] ALSA: doc: Use DEFINE_SIMPLE_DEV_PM_OPS() Takashi Iwai

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=20240207155140.18238-5-tiwai@suse.de \
    --to=tiwai@suse.de \
    --cc=linux-sound@vger.kernel.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.