mirror of
https://mirrors.bfsu.edu.cn/git/linux.git
synced 2024-11-15 08:14:15 +08:00
ASoC: cs35l56: Use pm_ptr()
Use pm_ptr() when setting the pointer to the dev_pm_ops so that it will be NULL if CONFIG_PM is disabled. This allows the dev_pm_ops to be compiled out in that case. Signed-off-by: Richard Fitzgerald <rf@opensource.cirrus.com> Link: https://lore.kernel.org/r/20230914150918.14505-2-rf@opensource.cirrus.com Signed-off-by: Mark Brown <broonie@kernel.org>
This commit is contained in:
parent
353bc9924c
commit
3d3a866795
@ -73,7 +73,7 @@ MODULE_DEVICE_TABLE(acpi, cs35l56_asoc_acpi_match);
|
||||
static struct i2c_driver cs35l56_i2c_driver = {
|
||||
.driver = {
|
||||
.name = "cs35l56",
|
||||
.pm = &cs35l56_pm_ops_i2c_spi,
|
||||
.pm = pm_ptr(&cs35l56_pm_ops_i2c_spi),
|
||||
.acpi_match_table = ACPI_PTR(cs35l56_asoc_acpi_match),
|
||||
},
|
||||
.id_table = cs35l56_id_i2c,
|
||||
|
@ -550,7 +550,7 @@ MODULE_DEVICE_TABLE(sdw, cs35l56_sdw_id);
|
||||
static struct sdw_driver cs35l56_sdw_driver = {
|
||||
.driver = {
|
||||
.name = "cs35l56",
|
||||
.pm = &cs35l56_sdw_pm,
|
||||
.pm = pm_ptr(&cs35l56_sdw_pm),
|
||||
},
|
||||
.probe = cs35l56_sdw_probe,
|
||||
.remove = cs35l56_sdw_remove,
|
||||
|
@ -70,7 +70,7 @@ MODULE_DEVICE_TABLE(acpi, cs35l56_asoc_acpi_match);
|
||||
static struct spi_driver cs35l56_spi_driver = {
|
||||
.driver = {
|
||||
.name = "cs35l56",
|
||||
.pm = &cs35l56_pm_ops_i2c_spi,
|
||||
.pm = pm_ptr(&cs35l56_pm_ops_i2c_spi),
|
||||
.acpi_match_table = ACPI_PTR(cs35l56_asoc_acpi_match),
|
||||
},
|
||||
.id_table = cs35l56_id_spi,
|
||||
|
Loading…
Reference in New Issue
Block a user