Skip to content

Commit 4c60cf8

Browse files
committed
ALSA: atmel: Convert to DEFINE_SIMPLE_DEV_PM_OPS() macro
Use the newer DEFINE_SIMPLE_DEV_PM_OPS() macro instead of SIMPLE_DEV_PM_OPS() together with pm_ptr(), which makes CONFIG_PM_SLEEP ifdefs superfluous. Merely a cleanup, there should be no actual code change. Signed-off-by: Takashi Iwai <[email protected]> Link: https://patch.msgid.link/[email protected]
1 parent 3954382 commit 4c60cf8

File tree

1 file changed

+2
-7
lines changed

1 file changed

+2
-7
lines changed

sound/atmel/ac97c.c

Lines changed: 2 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -817,7 +817,6 @@ static int atmel_ac97c_probe(struct platform_device *pdev)
817817
return retval;
818818
}
819819

820-
#ifdef CONFIG_PM_SLEEP
821820
static int atmel_ac97c_suspend(struct device *pdev)
822821
{
823822
struct snd_card *card = dev_get_drvdata(pdev);
@@ -836,11 +835,7 @@ static int atmel_ac97c_resume(struct device *pdev)
836835
return ret;
837836
}
838837

839-
static SIMPLE_DEV_PM_OPS(atmel_ac97c_pm, atmel_ac97c_suspend, atmel_ac97c_resume);
840-
#define ATMEL_AC97C_PM_OPS &atmel_ac97c_pm
841-
#else
842-
#define ATMEL_AC97C_PM_OPS NULL
843-
#endif
838+
static DEFINE_SIMPLE_DEV_PM_OPS(atmel_ac97c_pm, atmel_ac97c_suspend, atmel_ac97c_resume);
844839

845840
static void atmel_ac97c_remove(struct platform_device *pdev)
846841
{
@@ -864,7 +859,7 @@ static struct platform_driver atmel_ac97c_driver = {
864859
.remove = atmel_ac97c_remove,
865860
.driver = {
866861
.name = "atmel_ac97c",
867-
.pm = ATMEL_AC97C_PM_OPS,
862+
.pm = pm_ptr(&atmel_ac97c_pm),
868863
.of_match_table = atmel_ac97c_dt_ids,
869864
},
870865
};

0 commit comments

Comments
 (0)