Commit 5ea0a220 authored by Takashi Iwai's avatar Takashi Iwai
Browse files

ALSA: oxygen: Convert to EXPORT_SIMPLE_DEV_PM_OPS()



Use the newer EXPORT_SIMPLE_DEV_PM_OPS() macro instead of
SIPLE_DEV_PM_OPS() and manual export, together with pm_ptr() macro,
which makes CONFIG_PM_SLEEP ifdefs superfluous.

Merely a cleanup, there should be no actual code change.

Signed-off-by: default avatarTakashi Iwai <tiwai@suse.de>
Link: https://patch.msgid.link/20250313170731.26943-8-tiwai@suse.de
parent f923335d
Loading
Loading
Loading
Loading
+1 −3
Original line number Diff line number Diff line
@@ -854,11 +854,9 @@ static struct pci_driver oxygen_driver = {
	.name = KBUILD_MODNAME,
	.id_table = oxygen_ids,
	.probe = generic_oxygen_probe,
#ifdef CONFIG_PM_SLEEP
	.driver = {
		.pm = &oxygen_pci_pm,
		.pm = pm_ptr(&oxygen_pci_pm),
	},
#endif
};

module_pci_driver(oxygen_driver);
+0 −2
Original line number Diff line number Diff line
@@ -161,9 +161,7 @@ int oxygen_pci_probe(struct pci_dev *pci, int index, char *id,
				      const struct pci_device_id *id
				     )
		    );
#ifdef CONFIG_PM_SLEEP
extern const struct dev_pm_ops oxygen_pci_pm;
#endif
void oxygen_pci_shutdown(struct pci_dev *pci);

/* oxygen_mixer.c */
+1 −4
Original line number Diff line number Diff line
@@ -713,7 +713,6 @@ int oxygen_pci_probe(struct pci_dev *pci, int index, char *id,
}
EXPORT_SYMBOL(oxygen_pci_probe);

#ifdef CONFIG_PM_SLEEP
static int oxygen_pci_suspend(struct device *dev)
{
	struct snd_card *card = dev_get_drvdata(dev);
@@ -789,9 +788,7 @@ static int oxygen_pci_resume(struct device *dev)
	return 0;
}

SIMPLE_DEV_PM_OPS(oxygen_pci_pm, oxygen_pci_suspend, oxygen_pci_resume);
EXPORT_SYMBOL(oxygen_pci_pm);
#endif /* CONFIG_PM_SLEEP */
EXPORT_SIMPLE_DEV_PM_OPS(oxygen_pci_pm, oxygen_pci_suspend, oxygen_pci_resume);

void oxygen_pci_shutdown(struct pci_dev *pci)
{
+1 −3
Original line number Diff line number Diff line
@@ -137,11 +137,9 @@ static struct pci_driver se6x_driver = {
	.name = KBUILD_MODNAME,
	.id_table = se6x_ids,
	.probe = se6x_probe,
#ifdef CONFIG_PM_SLEEP
	.driver = {
		.pm = &oxygen_pci_pm,
		.pm = pm_ptr(&oxygen_pci_pm),
	},
#endif
	.shutdown = oxygen_pci_shutdown,
};

+1 −3
Original line number Diff line number Diff line
@@ -82,11 +82,9 @@ static struct pci_driver xonar_driver = {
	.name = KBUILD_MODNAME,
	.id_table = xonar_ids,
	.probe = xonar_probe,
#ifdef CONFIG_PM_SLEEP
	.driver = {
		.pm = &oxygen_pci_pm,
		.pm = pm_ptr(&oxygen_pci_pm),
	},
#endif
	.shutdown = oxygen_pci_shutdown,
};