mirror of
git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
synced 2025-08-05 16:54:27 +00:00
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: Takashi Iwai <tiwai@suse.de> Link: https://patch.msgid.link/20250313170731.26943-8-tiwai@suse.de
This commit is contained in:
parent
f923335da9
commit
5ea0a2206b
5 changed files with 4 additions and 15 deletions
|
@ -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);
|
||||
|
|
|
@ -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 */
|
||||
|
|
|
@ -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)
|
||||
{
|
||||
|
|
|
@ -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,
|
||||
};
|
||||
|
||||
|
|
|
@ -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,
|
||||
};
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue