mirror of
				https://github.com/torvalds/linux.git
				synced 2025-11-04 02:30:34 +02:00 
			
		
		
		
	ALSA: dummy: Replace with DEFINE_SIPMLE_DEV_PM_OPS()
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> Link: https://lore.kernel.org/r/20240207155140.18238-3-tiwai@suse.de Signed-off-by: Takashi Iwai <tiwai@suse.de>
This commit is contained in:
		
							parent
							
								
									dd96516a7d
								
							
						
					
					
						commit
						d728eed42f
					
				
					 1 changed files with 2 additions and 7 deletions
				
			
		| 
						 | 
					@ -1098,7 +1098,6 @@ static int snd_dummy_probe(struct platform_device *devptr)
 | 
				
			||||||
	return 0;
 | 
						return 0;
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
#ifdef CONFIG_PM_SLEEP
 | 
					 | 
				
			||||||
static int snd_dummy_suspend(struct device *pdev)
 | 
					static int snd_dummy_suspend(struct device *pdev)
 | 
				
			||||||
{
 | 
					{
 | 
				
			||||||
	struct snd_card *card = dev_get_drvdata(pdev);
 | 
						struct snd_card *card = dev_get_drvdata(pdev);
 | 
				
			||||||
| 
						 | 
					@ -1115,11 +1114,7 @@ static int snd_dummy_resume(struct device *pdev)
 | 
				
			||||||
	return 0;
 | 
						return 0;
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
static SIMPLE_DEV_PM_OPS(snd_dummy_pm, snd_dummy_suspend, snd_dummy_resume);
 | 
					static DEFINE_SIMPLE_DEV_PM_OPS(snd_dummy_pm, snd_dummy_suspend, snd_dummy_resume);
 | 
				
			||||||
#define SND_DUMMY_PM_OPS	&snd_dummy_pm
 | 
					 | 
				
			||||||
#else
 | 
					 | 
				
			||||||
#define SND_DUMMY_PM_OPS	NULL
 | 
					 | 
				
			||||||
#endif
 | 
					 | 
				
			||||||
 | 
					
 | 
				
			||||||
#define SND_DUMMY_DRIVER	"snd_dummy"
 | 
					#define SND_DUMMY_DRIVER	"snd_dummy"
 | 
				
			||||||
 | 
					
 | 
				
			||||||
| 
						 | 
					@ -1127,7 +1122,7 @@ static struct platform_driver snd_dummy_driver = {
 | 
				
			||||||
	.probe		= snd_dummy_probe,
 | 
						.probe		= snd_dummy_probe,
 | 
				
			||||||
	.driver		= {
 | 
						.driver		= {
 | 
				
			||||||
		.name	= SND_DUMMY_DRIVER,
 | 
							.name	= SND_DUMMY_DRIVER,
 | 
				
			||||||
		.pm	= SND_DUMMY_PM_OPS,
 | 
							.pm	= &snd_dummy_pm,
 | 
				
			||||||
	},
 | 
						},
 | 
				
			||||||
};
 | 
					};
 | 
				
			||||||
 | 
					
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
		Loading…
	
		Reference in a new issue