mirror of
https://github.com/edk2-porting/linux-next.git
synced 2024-11-23 10:06:28 +08:00
ALSA: doc: Use DEFINE_SIMPLE_DEV_PM_OPS()
Use the new DEFINE_SIMPLE_DEV_PM_OPS() instead of SIMPLE_DEV_PM_OPS() for the example code. This allows us to drop CONFIG_PM_SLEEP ifdefs. While we're at it, expand the driver definition instead of passing directly via .driver.pm field. This seems to be a more common pattern. Signed-off-by: Takashi Iwai <tiwai@suse.de> Link: https://lore.kernel.org/r/20240207155140.18238-30-tiwai@suse.de Signed-off-by: Takashi Iwai <tiwai@suse.de>
This commit is contained in:
parent
8dbcc799a4
commit
e129d6c9ac
@ -3864,14 +3864,16 @@ corresponding destructor.
|
||||
|
||||
And next, set suspend/resume callbacks to the pci_driver::
|
||||
|
||||
static SIMPLE_DEV_PM_OPS(snd_my_pm_ops, mychip_suspend, mychip_resume);
|
||||
static DEFINE_SIMPLE_DEV_PM_OPS(snd_my_pm_ops, mychip_suspend, mychip_resume);
|
||||
|
||||
static struct pci_driver driver = {
|
||||
.name = KBUILD_MODNAME,
|
||||
.id_table = snd_my_ids,
|
||||
.probe = snd_my_probe,
|
||||
.remove = snd_my_remove,
|
||||
.driver.pm = &snd_my_pm_ops,
|
||||
.driver = {
|
||||
.pm = &snd_my_pm_ops,
|
||||
},
|
||||
};
|
||||
|
||||
Module Parameters
|
||||
|
Loading…
Reference in New Issue
Block a user