Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

ASoC: Convert to modern PM macros

Merge series from Takashi Iwai <tiwai@suse.de>:

This is a revised series of small and trivial patches to convert to
the newer PM macros, e.g. from SET_RUNTIME_PM_OPS() to
RUNTIME_PM_OPS().

The conversions are systematic, and we could reduce messy
__maybe_unused and ifdefs with those changes.

Merely code refactoring, and shouldn't change the actual driver
behavior.

+591 -764
+5 -5
sound/soc/amd/acp/acp-pci.c
··· 221 221 return ret; 222 222 }; 223 223 224 - static int __maybe_unused snd_acp_suspend(struct device *dev) 224 + static int snd_acp_suspend(struct device *dev) 225 225 { 226 226 struct acp_chip_info *chip; 227 227 int ret; ··· 233 233 return ret; 234 234 } 235 235 236 - static int __maybe_unused snd_acp_resume(struct device *dev) 236 + static int snd_acp_resume(struct device *dev) 237 237 { 238 238 struct acp_chip_info *chip; 239 239 int ret; ··· 251 251 } 252 252 253 253 static const struct dev_pm_ops acp_pm_ops = { 254 - SET_RUNTIME_PM_OPS(snd_acp_suspend, snd_acp_resume, NULL) 255 - SET_SYSTEM_SLEEP_PM_OPS(snd_acp_suspend, snd_acp_resume) 254 + RUNTIME_PM_OPS(snd_acp_suspend, snd_acp_resume, NULL) 255 + SYSTEM_SLEEP_PM_OPS(snd_acp_suspend, snd_acp_resume) 256 256 }; 257 257 258 258 static void acp_pci_remove(struct pci_dev *pci) ··· 289 289 .probe = acp_pci_probe, 290 290 .remove = acp_pci_remove, 291 291 .driver = { 292 - .pm = &acp_pm_ops, 292 + .pm = pm_ptr(&acp_pm_ops), 293 293 }, 294 294 }; 295 295 module_pci_driver(snd_amd_acp_pci_driver);
+3 -3
sound/soc/amd/acp/acp-rembrandt.c
··· 197 197 pm_runtime_disable(&pdev->dev); 198 198 } 199 199 200 - static int __maybe_unused rmb_pcm_resume(struct device *dev) 200 + static int rmb_pcm_resume(struct device *dev) 201 201 { 202 202 struct acp_chip_info *chip = dev_get_platdata(dev); 203 203 struct acp_stream *stream; ··· 227 227 } 228 228 229 229 static const struct dev_pm_ops rmb_dma_pm_ops = { 230 - SET_SYSTEM_SLEEP_PM_OPS(NULL, rmb_pcm_resume) 230 + SYSTEM_SLEEP_PM_OPS(NULL, rmb_pcm_resume) 231 231 }; 232 232 233 233 static struct platform_driver rembrandt_driver = { ··· 235 235 .remove = rembrandt_audio_remove, 236 236 .driver = { 237 237 .name = "acp_asoc_rembrandt", 238 - .pm = &rmb_dma_pm_ops, 238 + .pm = pm_ptr(&rmb_dma_pm_ops), 239 239 }, 240 240 }; 241 241
+3 -3
sound/soc/amd/acp/acp-renoir.c
··· 144 144 acp_platform_unregister(dev); 145 145 } 146 146 147 - static int __maybe_unused rn_pcm_resume(struct device *dev) 147 + static int rn_pcm_resume(struct device *dev) 148 148 { 149 149 struct acp_chip_info *chip = dev_get_platdata(dev); 150 150 struct acp_stream *stream; ··· 171 171 } 172 172 173 173 static const struct dev_pm_ops rn_dma_pm_ops = { 174 - SET_SYSTEM_SLEEP_PM_OPS(NULL, rn_pcm_resume) 174 + SYSTEM_SLEEP_PM_OPS(NULL, rn_pcm_resume) 175 175 }; 176 176 177 177 static struct platform_driver renoir_driver = { ··· 179 179 .remove = renoir_audio_remove, 180 180 .driver = { 181 181 .name = "acp_asoc_renoir", 182 - .pm = &rn_dma_pm_ops, 182 + .pm = pm_ptr(&rn_dma_pm_ops), 183 183 }, 184 184 }; 185 185
+3 -3
sound/soc/amd/acp/acp63.c
··· 248 248 pm_runtime_disable(&pdev->dev); 249 249 } 250 250 251 - static int __maybe_unused acp63_pcm_resume(struct device *dev) 251 + static int acp63_pcm_resume(struct device *dev) 252 252 { 253 253 struct acp_chip_info *chip = dev_get_platdata(dev); 254 254 struct acp_stream *stream; ··· 278 278 } 279 279 280 280 static const struct dev_pm_ops acp63_dma_pm_ops = { 281 - SET_SYSTEM_SLEEP_PM_OPS(NULL, acp63_pcm_resume) 281 + SYSTEM_SLEEP_PM_OPS(NULL, acp63_pcm_resume) 282 282 }; 283 283 284 284 static struct platform_driver acp63_driver = { ··· 286 286 .remove = acp63_audio_remove, 287 287 .driver = { 288 288 .name = "acp_asoc_acp63", 289 - .pm = &acp63_dma_pm_ops, 289 + .pm = pm_ptr(&acp63_dma_pm_ops), 290 290 }, 291 291 }; 292 292
+3 -3
sound/soc/amd/acp/acp70.c
··· 180 180 pm_runtime_disable(&pdev->dev); 181 181 } 182 182 183 - static int __maybe_unused acp70_pcm_resume(struct device *dev) 183 + static int acp70_pcm_resume(struct device *dev) 184 184 { 185 185 struct acp_chip_info *chip = dev_get_platdata(dev); 186 186 struct acp_stream *stream; ··· 207 207 } 208 208 209 209 static const struct dev_pm_ops acp70_dma_pm_ops = { 210 - SET_SYSTEM_SLEEP_PM_OPS(NULL, acp70_pcm_resume) 210 + SYSTEM_SLEEP_PM_OPS(NULL, acp70_pcm_resume) 211 211 }; 212 212 213 213 static struct platform_driver acp70_driver = { ··· 215 215 .remove = acp_acp70_audio_remove, 216 216 .driver = { 217 217 .name = "acp_asoc_acp70", 218 - .pm = &acp70_dma_pm_ops, 218 + .pm = pm_ptr(&acp70_dma_pm_ops), 219 219 }, 220 220 }; 221 221
+6 -6
sound/soc/amd/ps/pci-ps.c
··· 668 668 return ret; 669 669 } 670 670 671 - static int __maybe_unused snd_acp_suspend(struct device *dev) 671 + static int snd_acp_suspend(struct device *dev) 672 672 { 673 673 return acp_hw_suspend(dev); 674 674 } 675 675 676 - static int __maybe_unused snd_acp_runtime_resume(struct device *dev) 676 + static int snd_acp_runtime_resume(struct device *dev) 677 677 { 678 678 return acp_hw_runtime_resume(dev); 679 679 } 680 680 681 - static int __maybe_unused snd_acp_resume(struct device *dev) 681 + static int snd_acp_resume(struct device *dev) 682 682 { 683 683 return acp_hw_resume(dev); 684 684 } 685 685 686 686 static const struct dev_pm_ops acp63_pm_ops = { 687 - SET_RUNTIME_PM_OPS(snd_acp_suspend, snd_acp_runtime_resume, NULL) 688 - SET_SYSTEM_SLEEP_PM_OPS(snd_acp_suspend, snd_acp_resume) 687 + RUNTIME_PM_OPS(snd_acp_suspend, snd_acp_runtime_resume, NULL) 688 + SYSTEM_SLEEP_PM_OPS(snd_acp_suspend, snd_acp_resume) 689 689 }; 690 690 691 691 static void snd_acp63_remove(struct pci_dev *pci) ··· 727 727 .probe = snd_acp63_probe, 728 728 .remove = snd_acp63_remove, 729 729 .driver = { 730 - .pm = &acp63_pm_ops, 730 + .pm = pm_ptr(&acp63_pm_ops), 731 731 } 732 732 }; 733 733
+6 -6
sound/soc/amd/ps/ps-pdm-dma.c
··· 402 402 pm_runtime_disable(&pdev->dev); 403 403 } 404 404 405 - static int __maybe_unused acp63_pdm_resume(struct device *dev) 405 + static int acp63_pdm_resume(struct device *dev) 406 406 { 407 407 struct pdm_dev_data *adata; 408 408 struct snd_pcm_runtime *runtime; ··· 423 423 return 0; 424 424 } 425 425 426 - static int __maybe_unused acp63_pdm_suspend(struct device *dev) 426 + static int acp63_pdm_suspend(struct device *dev) 427 427 { 428 428 struct pdm_dev_data *adata; 429 429 ··· 432 432 return 0; 433 433 } 434 434 435 - static int __maybe_unused acp63_pdm_runtime_resume(struct device *dev) 435 + static int acp63_pdm_runtime_resume(struct device *dev) 436 436 { 437 437 struct pdm_dev_data *adata; 438 438 ··· 442 442 } 443 443 444 444 static const struct dev_pm_ops acp63_pdm_pm_ops = { 445 - SET_RUNTIME_PM_OPS(acp63_pdm_suspend, acp63_pdm_runtime_resume, NULL) 446 - SET_SYSTEM_SLEEP_PM_OPS(acp63_pdm_suspend, acp63_pdm_resume) 445 + RUNTIME_PM_OPS(acp63_pdm_suspend, acp63_pdm_runtime_resume, NULL) 446 + SYSTEM_SLEEP_PM_OPS(acp63_pdm_suspend, acp63_pdm_resume) 447 447 }; 448 448 449 449 static struct platform_driver acp63_pdm_dma_driver = { ··· 451 451 .remove = acp63_pdm_audio_remove, 452 452 .driver = { 453 453 .name = "acp_ps_pdm_dma", 454 - .pm = &acp63_pdm_pm_ops, 454 + .pm = pm_ptr(&acp63_pdm_pm_ops), 455 455 }, 456 456 }; 457 457
+3 -3
sound/soc/amd/ps/ps-sdw-dma.c
··· 767 767 return 0; 768 768 } 769 769 770 - static int __maybe_unused acp63_sdw_pcm_resume(struct device *dev) 770 + static int acp63_sdw_pcm_resume(struct device *dev) 771 771 { 772 772 struct sdw_dma_dev_data *sdw_data; 773 773 ··· 779 779 } 780 780 781 781 static const struct dev_pm_ops acp63_pm_ops = { 782 - SET_SYSTEM_SLEEP_PM_OPS(NULL, acp63_sdw_pcm_resume) 782 + SYSTEM_SLEEP_PM_OPS(NULL, acp63_sdw_pcm_resume) 783 783 }; 784 784 785 785 static struct platform_driver acp63_sdw_dma_driver = { ··· 787 787 .remove = acp63_sdw_platform_remove, 788 788 .driver = { 789 789 .name = "amd_ps_sdw_dma", 790 - .pm = &acp63_pm_ops, 790 + .pm = pm_ptr(&acp63_pm_ops), 791 791 }, 792 792 }; 793 793
+5 -5
sound/soc/amd/rpl/rpl-pci-acp6x.c
··· 159 159 return ret; 160 160 } 161 161 162 - static int __maybe_unused snd_rpl_suspend(struct device *dev) 162 + static int snd_rpl_suspend(struct device *dev) 163 163 { 164 164 struct rpl_dev_data *adata; 165 165 int ret; ··· 171 171 return ret; 172 172 } 173 173 174 - static int __maybe_unused snd_rpl_resume(struct device *dev) 174 + static int snd_rpl_resume(struct device *dev) 175 175 { 176 176 struct rpl_dev_data *adata; 177 177 int ret; ··· 184 184 } 185 185 186 186 static const struct dev_pm_ops rpl_pm = { 187 - SET_RUNTIME_PM_OPS(snd_rpl_suspend, snd_rpl_resume, NULL) 188 - SET_SYSTEM_SLEEP_PM_OPS(snd_rpl_suspend, snd_rpl_resume) 187 + RUNTIME_PM_OPS(snd_rpl_suspend, snd_rpl_resume, NULL) 188 + SYSTEM_SLEEP_PM_OPS(snd_rpl_suspend, snd_rpl_resume) 189 189 }; 190 190 191 191 static void snd_rpl_remove(struct pci_dev *pci) ··· 217 217 .probe = snd_rpl_probe, 218 218 .remove = snd_rpl_remove, 219 219 .driver = { 220 - .pm = &rpl_pm, 220 + .pm = pm_ptr(&rpl_pm), 221 221 } 222 222 }; 223 223
+5 -6
sound/soc/amd/vangogh/acp5x-pcm-dma.c
··· 420 420 pm_runtime_disable(&pdev->dev); 421 421 } 422 422 423 - static int __maybe_unused acp5x_pcm_resume(struct device *dev) 423 + static int acp5x_pcm_resume(struct device *dev) 424 424 { 425 425 struct i2s_dev_data *adata; 426 426 struct i2s_stream_instance *rtd; ··· 473 473 return 0; 474 474 } 475 475 476 - static int __maybe_unused acp5x_pcm_suspend(struct device *dev) 476 + static int acp5x_pcm_suspend(struct device *dev) 477 477 { 478 478 struct i2s_dev_data *adata; 479 479 ··· 482 482 return 0; 483 483 } 484 484 485 - static int __maybe_unused acp5x_pcm_runtime_resume(struct device *dev) 485 + static int acp5x_pcm_runtime_resume(struct device *dev) 486 486 { 487 487 struct i2s_dev_data *adata; 488 488 ··· 492 492 } 493 493 494 494 static const struct dev_pm_ops acp5x_pm_ops = { 495 - SET_RUNTIME_PM_OPS(acp5x_pcm_suspend, 496 - acp5x_pcm_runtime_resume, NULL) 497 - SET_SYSTEM_SLEEP_PM_OPS(acp5x_pcm_suspend, acp5x_pcm_resume) 495 + RUNTIME_PM_OPS(acp5x_pcm_suspend, acp5x_pcm_runtime_resume, NULL) 496 + SYSTEM_SLEEP_PM_OPS(acp5x_pcm_suspend, acp5x_pcm_resume) 498 497 }; 499 498 500 499 static struct platform_driver acp5x_dma_driver = {
+6 -6
sound/soc/amd/yc/acp6x-pdm-dma.c
··· 394 394 pm_runtime_disable(&pdev->dev); 395 395 } 396 396 397 - static int __maybe_unused acp6x_pdm_resume(struct device *dev) 397 + static int acp6x_pdm_resume(struct device *dev) 398 398 { 399 399 struct pdm_dev_data *adata; 400 400 struct snd_pcm_runtime *runtime; ··· 415 415 return 0; 416 416 } 417 417 418 - static int __maybe_unused acp6x_pdm_suspend(struct device *dev) 418 + static int acp6x_pdm_suspend(struct device *dev) 419 419 { 420 420 struct pdm_dev_data *adata; 421 421 ··· 424 424 return 0; 425 425 } 426 426 427 - static int __maybe_unused acp6x_pdm_runtime_resume(struct device *dev) 427 + static int acp6x_pdm_runtime_resume(struct device *dev) 428 428 { 429 429 struct pdm_dev_data *adata; 430 430 ··· 434 434 } 435 435 436 436 static const struct dev_pm_ops acp6x_pdm_pm_ops = { 437 - SET_RUNTIME_PM_OPS(acp6x_pdm_suspend, acp6x_pdm_runtime_resume, NULL) 438 - SET_SYSTEM_SLEEP_PM_OPS(acp6x_pdm_suspend, acp6x_pdm_resume) 437 + RUNTIME_PM_OPS(acp6x_pdm_suspend, acp6x_pdm_runtime_resume, NULL) 438 + SYSTEM_SLEEP_PM_OPS(acp6x_pdm_suspend, acp6x_pdm_resume) 439 439 }; 440 440 441 441 static struct platform_driver acp6x_pdm_dma_driver = { ··· 443 443 .remove = acp6x_pdm_audio_remove, 444 444 .driver = { 445 445 .name = "acp_yc_pdm_dma", 446 - .pm = &acp6x_pdm_pm_ops, 446 + .pm = pm_ptr(&acp6x_pdm_pm_ops), 447 447 }, 448 448 }; 449 449
+5 -5
sound/soc/amd/yc/pci-acp6x.c
··· 277 277 return ret; 278 278 } 279 279 280 - static int __maybe_unused snd_acp6x_suspend(struct device *dev) 280 + static int snd_acp6x_suspend(struct device *dev) 281 281 { 282 282 struct acp6x_dev_data *adata; 283 283 int ret; ··· 289 289 return ret; 290 290 } 291 291 292 - static int __maybe_unused snd_acp6x_resume(struct device *dev) 292 + static int snd_acp6x_resume(struct device *dev) 293 293 { 294 294 struct acp6x_dev_data *adata; 295 295 int ret; ··· 302 302 } 303 303 304 304 static const struct dev_pm_ops acp6x_pm = { 305 - SET_RUNTIME_PM_OPS(snd_acp6x_suspend, snd_acp6x_resume, NULL) 306 - SET_SYSTEM_SLEEP_PM_OPS(snd_acp6x_suspend, snd_acp6x_resume) 305 + RUNTIME_PM_OPS(snd_acp6x_suspend, snd_acp6x_resume, NULL) 306 + SYSTEM_SLEEP_PM_OPS(snd_acp6x_suspend, snd_acp6x_resume) 307 307 }; 308 308 309 309 static void snd_acp6x_remove(struct pci_dev *pci) ··· 339 339 .probe = snd_acp6x_probe, 340 340 .remove = snd_acp6x_remove, 341 341 .driver = { 342 - .pm = &acp6x_pm, 342 + .pm = pm_ptr(&acp6x_pm), 343 343 } 344 344 }; 345 345
+3 -14
sound/soc/au1x/i2sc.c
··· 279 279 WR(ctx, I2S_ENABLE, EN_D); /* clock off, disable */ 280 280 } 281 281 282 - #ifdef CONFIG_PM 283 282 static int au1xi2s_drvsuspend(struct device *dev) 284 283 { 285 284 struct au1xpsc_audio_data *ctx = dev_get_drvdata(dev); ··· 293 294 return 0; 294 295 } 295 296 296 - static const struct dev_pm_ops au1xi2sc_pmops = { 297 - .suspend = au1xi2s_drvsuspend, 298 - .resume = au1xi2s_drvresume, 299 - }; 300 - 301 - #define AU1XI2SC_PMOPS (&au1xi2sc_pmops) 302 - 303 - #else 304 - 305 - #define AU1XI2SC_PMOPS NULL 306 - 307 - #endif 297 + static DEFINE_SIMPLE_DEV_PM_OPS(au1xi2sc_pmops, au1xi2s_drvsuspend, 298 + au1xi2s_drvresume); 308 299 309 300 static struct platform_driver au1xi2s_driver = { 310 301 .driver = { 311 302 .name = "alchemy-i2sc", 312 - .pm = AU1XI2SC_PMOPS, 303 + .pm = pm_ptr(&au1xi2sc_pmops), 313 304 }, 314 305 .probe = au1xi2s_drvprobe, 315 306 .remove = au1xi2s_drvremove,
+3 -14
sound/soc/au1x/psc-ac97.c
··· 436 436 au1xpsc_ac97_workdata = NULL; /* MDEV */ 437 437 } 438 438 439 - #ifdef CONFIG_PM 440 439 static int au1xpsc_ac97_drvsuspend(struct device *dev) 441 440 { 442 441 struct au1xpsc_audio_data *wd = dev_get_drvdata(dev); ··· 466 467 return 0; 467 468 } 468 469 469 - static const struct dev_pm_ops au1xpscac97_pmops = { 470 - .suspend = au1xpsc_ac97_drvsuspend, 471 - .resume = au1xpsc_ac97_drvresume, 472 - }; 473 - 474 - #define AU1XPSCAC97_PMOPS &au1xpscac97_pmops 475 - 476 - #else 477 - 478 - #define AU1XPSCAC97_PMOPS NULL 479 - 480 - #endif 470 + static DEFINE_SIMPLE_DEV_PM_OPS(au1xpscac97_pmops, au1xpsc_ac97_drvsuspend, 471 + au1xpsc_ac97_drvresume); 481 472 482 473 static struct platform_driver au1xpsc_ac97_driver = { 483 474 .driver = { 484 475 .name = "au1xpsc_ac97", 485 - .pm = AU1XPSCAC97_PMOPS, 476 + .pm = pm_ptr(&au1xpscac97_pmops), 486 477 }, 487 478 .probe = au1xpsc_ac97_drvprobe, 488 479 .remove = au1xpsc_ac97_drvremove,
+3 -14
sound/soc/au1x/psc-i2s.c
··· 354 354 wmb(); /* drain writebuffer */ 355 355 } 356 356 357 - #ifdef CONFIG_PM 358 357 static int au1xpsc_i2s_drvsuspend(struct device *dev) 359 358 { 360 359 struct au1xpsc_audio_data *wd = dev_get_drvdata(dev); ··· 384 385 return 0; 385 386 } 386 387 387 - static const struct dev_pm_ops au1xpsci2s_pmops = { 388 - .suspend = au1xpsc_i2s_drvsuspend, 389 - .resume = au1xpsc_i2s_drvresume, 390 - }; 391 - 392 - #define AU1XPSCI2S_PMOPS &au1xpsci2s_pmops 393 - 394 - #else 395 - 396 - #define AU1XPSCI2S_PMOPS NULL 397 - 398 - #endif 388 + static DEFINE_SIMPLE_DEV_PM_OPS(au1xpsci2s_pmops, au1xpsc_i2s_drvsuspend, 389 + au1xpsc_i2s_drvresume); 399 390 400 391 static struct platform_driver au1xpsc_i2s_driver = { 401 392 .driver = { 402 393 .name = "au1xpsc_i2s", 403 - .pm = AU1XPSCI2S_PMOPS, 394 + .pm = pm_ptr(&au1xpsci2s_pmops), 404 395 }, 405 396 .probe = au1xpsc_i2s_drvprobe, 406 397 .remove = au1xpsc_i2s_drvremove,
+5 -6
sound/soc/codecs/ak4375.c
··· 438 438 return 0; 439 439 } 440 440 441 - static int __maybe_unused ak4375_runtime_suspend(struct device *dev) 441 + static int ak4375_runtime_suspend(struct device *dev) 442 442 { 443 443 struct ak4375_priv *ak4375 = dev_get_drvdata(dev); 444 444 ··· 448 448 return 0; 449 449 } 450 450 451 - static int __maybe_unused ak4375_runtime_resume(struct device *dev) 451 + static int ak4375_runtime_resume(struct device *dev) 452 452 { 453 453 struct ak4375_priv *ak4375 = dev_get_drvdata(dev); 454 454 int ret; ··· 490 490 }; 491 491 492 492 static const struct dev_pm_ops ak4375_pm = { 493 - SET_RUNTIME_PM_OPS(ak4375_runtime_suspend, ak4375_runtime_resume, NULL) 494 - SET_SYSTEM_SLEEP_PM_OPS(pm_runtime_force_suspend, 495 - pm_runtime_force_resume) 493 + RUNTIME_PM_OPS(ak4375_runtime_suspend, ak4375_runtime_resume, NULL) 494 + SYSTEM_SLEEP_PM_OPS(pm_runtime_force_suspend, pm_runtime_force_resume) 496 495 }; 497 496 498 497 static int ak4375_i2c_probe(struct i2c_client *i2c) ··· 593 594 static struct i2c_driver ak4375_i2c_driver = { 594 595 .driver = { 595 596 .name = "ak4375", 596 - .pm = &ak4375_pm, 597 + .pm = pm_ptr(&ak4375_pm), 597 598 .of_match_table = ak4375_of_match, 598 599 }, 599 600 .probe = ak4375_i2c_probe,
+5 -8
sound/soc/codecs/ak4458.c
··· 639 639 } 640 640 } 641 641 642 - #ifdef CONFIG_PM 643 - static int __maybe_unused ak4458_runtime_suspend(struct device *dev) 642 + static int ak4458_runtime_suspend(struct device *dev) 644 643 { 645 644 struct ak4458_priv *ak4458 = dev_get_drvdata(dev); 646 645 ··· 655 656 return 0; 656 657 } 657 658 658 - static int __maybe_unused ak4458_runtime_resume(struct device *dev) 659 + static int ak4458_runtime_resume(struct device *dev) 659 660 { 660 661 struct ak4458_priv *ak4458 = dev_get_drvdata(dev); 661 662 int ret; ··· 677 678 678 679 return regcache_sync(ak4458->regmap); 679 680 } 680 - #endif /* CONFIG_PM */ 681 681 682 682 static const struct snd_soc_component_driver soc_codec_dev_ak4458 = { 683 683 .controls = ak4458_snd_controls, ··· 725 727 }; 726 728 727 729 static const struct dev_pm_ops ak4458_pm = { 728 - SET_RUNTIME_PM_OPS(ak4458_runtime_suspend, ak4458_runtime_resume, NULL) 729 - SET_SYSTEM_SLEEP_PM_OPS(pm_runtime_force_suspend, 730 - pm_runtime_force_resume) 730 + RUNTIME_PM_OPS(ak4458_runtime_suspend, ak4458_runtime_resume, NULL) 731 + SYSTEM_SLEEP_PM_OPS(pm_runtime_force_suspend, pm_runtime_force_resume) 731 732 }; 732 733 733 734 static int ak4458_i2c_probe(struct i2c_client *i2c) ··· 802 805 static struct i2c_driver ak4458_i2c_driver = { 803 806 .driver = { 804 807 .name = "ak4458", 805 - .pm = &ak4458_pm, 808 + .pm = pm_ptr(&ak4458_pm), 806 809 .of_match_table = ak4458_of_match, 807 810 }, 808 811 .probe = ak4458_i2c_probe,
+5 -6
sound/soc/codecs/ak5558.c
··· 342 342 ak5558_reset(ak5558, true); 343 343 } 344 344 345 - static int __maybe_unused ak5558_runtime_suspend(struct device *dev) 345 + static int ak5558_runtime_suspend(struct device *dev) 346 346 { 347 347 struct ak5558_priv *ak5558 = dev_get_drvdata(dev); 348 348 ··· 354 354 return 0; 355 355 } 356 356 357 - static int __maybe_unused ak5558_runtime_resume(struct device *dev) 357 + static int ak5558_runtime_resume(struct device *dev) 358 358 { 359 359 struct ak5558_priv *ak5558 = dev_get_drvdata(dev); 360 360 int ret; ··· 376 376 } 377 377 378 378 static const struct dev_pm_ops ak5558_pm = { 379 - SET_RUNTIME_PM_OPS(ak5558_runtime_suspend, ak5558_runtime_resume, NULL) 380 - SET_SYSTEM_SLEEP_PM_OPS(pm_runtime_force_suspend, 381 - pm_runtime_force_resume) 379 + RUNTIME_PM_OPS(ak5558_runtime_suspend, ak5558_runtime_resume, NULL) 380 + SYSTEM_SLEEP_PM_OPS(pm_runtime_force_suspend, pm_runtime_force_resume) 382 381 }; 383 382 384 383 static const struct snd_soc_component_driver soc_codec_dev_ak5558 = { ··· 494 495 .driver = { 495 496 .name = "ak5558", 496 497 .of_match_table = of_match_ptr(ak5558_i2c_dt_ids), 497 - .pm = &ak5558_pm, 498 + .pm = pm_ptr(&ak5558_pm), 498 499 }, 499 500 .probe = ak5558_i2c_probe, 500 501 .remove = ak5558_i2c_remove,
+2 -5
sound/soc/codecs/cs35l32.c
··· 504 504 gpiod_set_value_cansleep(cs35l32->reset_gpio, 0); 505 505 } 506 506 507 - #ifdef CONFIG_PM 508 507 static int cs35l32_runtime_suspend(struct device *dev) 509 508 { 510 509 struct cs35l32_private *cs35l32 = dev_get_drvdata(dev); ··· 542 543 543 544 return 0; 544 545 } 545 - #endif 546 546 547 547 static const struct dev_pm_ops cs35l32_runtime_pm = { 548 - SET_RUNTIME_PM_OPS(cs35l32_runtime_suspend, cs35l32_runtime_resume, 549 - NULL) 548 + RUNTIME_PM_OPS(cs35l32_runtime_suspend, cs35l32_runtime_resume, NULL) 550 549 }; 551 550 552 551 static const struct of_device_id cs35l32_of_match[] = { ··· 564 567 static struct i2c_driver cs35l32_i2c_driver = { 565 568 .driver = { 566 569 .name = "cs35l32", 567 - .pm = &cs35l32_runtime_pm, 570 + .pm = pm_ptr(&cs35l32_runtime_pm), 568 571 .of_match_table = cs35l32_of_match, 569 572 }, 570 573 .id_table = cs35l32_id,
+4 -6
sound/soc/codecs/cs35l33.c
··· 853 853 .use_single_write = true, 854 854 }; 855 855 856 - static int __maybe_unused cs35l33_runtime_resume(struct device *dev) 856 + static int cs35l33_runtime_resume(struct device *dev) 857 857 { 858 858 struct cs35l33_private *cs35l33 = dev_get_drvdata(dev); 859 859 int ret; ··· 891 891 return ret; 892 892 } 893 893 894 - static int __maybe_unused cs35l33_runtime_suspend(struct device *dev) 894 + static int cs35l33_runtime_suspend(struct device *dev) 895 895 { 896 896 struct cs35l33_private *cs35l33 = dev_get_drvdata(dev); 897 897 ··· 909 909 } 910 910 911 911 static const struct dev_pm_ops cs35l33_pm_ops = { 912 - SET_RUNTIME_PM_OPS(cs35l33_runtime_suspend, 913 - cs35l33_runtime_resume, 914 - NULL) 912 + RUNTIME_PM_OPS(cs35l33_runtime_suspend, cs35l33_runtime_resume, NULL) 915 913 }; 916 914 917 915 static int cs35l33_get_hg_data(const struct device_node *np, ··· 1271 1273 static struct i2c_driver cs35l33_i2c_driver = { 1272 1274 .driver = { 1273 1275 .name = "cs35l33", 1274 - .pm = &cs35l33_pm_ops, 1276 + .pm = pm_ptr(&cs35l33_pm_ops), 1275 1277 .of_match_table = cs35l33_of_match, 1276 1278 1277 1279 },
+4 -6
sound/soc/codecs/cs35l34.c
··· 1116 1116 cs35l34->core_supplies); 1117 1117 } 1118 1118 1119 - static int __maybe_unused cs35l34_runtime_resume(struct device *dev) 1119 + static int cs35l34_runtime_resume(struct device *dev) 1120 1120 { 1121 1121 struct cs35l34_private *cs35l34 = dev_get_drvdata(dev); 1122 1122 int ret; ··· 1149 1149 return ret; 1150 1150 } 1151 1151 1152 - static int __maybe_unused cs35l34_runtime_suspend(struct device *dev) 1152 + static int cs35l34_runtime_suspend(struct device *dev) 1153 1153 { 1154 1154 struct cs35l34_private *cs35l34 = dev_get_drvdata(dev); 1155 1155 ··· 1165 1165 } 1166 1166 1167 1167 static const struct dev_pm_ops cs35l34_pm_ops = { 1168 - SET_RUNTIME_PM_OPS(cs35l34_runtime_suspend, 1169 - cs35l34_runtime_resume, 1170 - NULL) 1168 + RUNTIME_PM_OPS(cs35l34_runtime_suspend, cs35l34_runtime_resume, NULL) 1171 1169 }; 1172 1170 1173 1171 static const struct of_device_id cs35l34_of_match[] = { ··· 1183 1185 static struct i2c_driver cs35l34_i2c_driver = { 1184 1186 .driver = { 1185 1187 .name = "cs35l34", 1186 - .pm = &cs35l34_pm_ops, 1188 + .pm = pm_ptr(&cs35l34_pm_ops), 1187 1189 .of_match_table = cs35l34_of_match, 1188 1190 1189 1191 },
+4 -4
sound/soc/codecs/cs4234.c
··· 860 860 cs4234_shutdown(cs4234); 861 861 } 862 862 863 - static int __maybe_unused cs4234_runtime_resume(struct device *dev) 863 + static int cs4234_runtime_resume(struct device *dev) 864 864 { 865 865 struct cs4234 *cs4234 = dev_get_drvdata(dev); 866 866 int ret; ··· 881 881 return 0; 882 882 } 883 883 884 - static int __maybe_unused cs4234_runtime_suspend(struct device *dev) 884 + static int cs4234_runtime_suspend(struct device *dev) 885 885 { 886 886 struct cs4234 *cs4234 = dev_get_drvdata(dev); 887 887 ··· 891 891 } 892 892 893 893 static const struct dev_pm_ops cs4234_pm = { 894 - SET_RUNTIME_PM_OPS(cs4234_runtime_suspend, cs4234_runtime_resume, NULL) 894 + RUNTIME_PM_OPS(cs4234_runtime_suspend, cs4234_runtime_resume, NULL) 895 895 }; 896 896 897 897 static const struct of_device_id cs4234_of_match[] = { ··· 903 903 static struct i2c_driver cs4234_i2c_driver = { 904 904 .driver = { 905 905 .name = "cs4234", 906 - .pm = &cs4234_pm, 906 + .pm = pm_ptr(&cs4234_pm), 907 907 .of_match_table = cs4234_of_match, 908 908 }, 909 909 .probe = cs4234_i2c_probe,
+3 -3
sound/soc/codecs/cs42l42-i2c.c
··· 48 48 cs42l42_common_remove(cs42l42); 49 49 } 50 50 51 - static int __maybe_unused cs42l42_i2c_resume(struct device *dev) 51 + static int cs42l42_i2c_resume(struct device *dev) 52 52 { 53 53 int ret; 54 54 ··· 62 62 } 63 63 64 64 static const struct dev_pm_ops cs42l42_i2c_pm_ops = { 65 - SET_SYSTEM_SLEEP_PM_OPS(cs42l42_suspend, cs42l42_i2c_resume) 65 + SYSTEM_SLEEP_PM_OPS(cs42l42_suspend, cs42l42_i2c_resume) 66 66 }; 67 67 68 68 static const struct of_device_id __maybe_unused cs42l42_of_match[] = { ··· 87 87 static struct i2c_driver cs42l42_i2c_driver = { 88 88 .driver = { 89 89 .name = "cs42l42", 90 - .pm = &cs42l42_i2c_pm_ops, 90 + .pm = pm_ptr(&cs42l42_i2c_pm_ops), 91 91 .of_match_table = of_match_ptr(cs42l42_of_match), 92 92 .acpi_match_table = ACPI_PTR(cs42l42_acpi_match), 93 93 },
+8 -8
sound/soc/codecs/cs42l42-sdw.c
··· 411 411 .port_prep = cs42l42_sdw_port_prep, 412 412 }; 413 413 414 - static int __maybe_unused cs42l42_sdw_runtime_suspend(struct device *dev) 414 + static int cs42l42_sdw_runtime_suspend(struct device *dev) 415 415 { 416 416 struct cs42l42_private *cs42l42 = dev_get_drvdata(dev); 417 417 ··· 426 426 return 0; 427 427 } 428 428 429 - static const struct reg_sequence __maybe_unused cs42l42_soft_reboot_seq[] = { 429 + static const struct reg_sequence cs42l42_soft_reboot_seq[] = { 430 430 REG_SEQ0(CS42L42_SOFT_RESET_REBOOT, 0x1e), 431 431 }; 432 432 433 - static int __maybe_unused cs42l42_sdw_handle_unattach(struct cs42l42_private *cs42l42) 433 + static int cs42l42_sdw_handle_unattach(struct cs42l42_private *cs42l42) 434 434 { 435 435 struct sdw_slave *peripheral = cs42l42->sdw_peripheral; 436 436 ··· 460 460 return 0; 461 461 } 462 462 463 - static int __maybe_unused cs42l42_sdw_runtime_resume(struct device *dev) 463 + static int cs42l42_sdw_runtime_resume(struct device *dev) 464 464 { 465 465 static const unsigned int ts_dbnce_ms[] = { 0, 125, 250, 500, 750, 1000, 1250, 1500}; 466 466 struct cs42l42_private *cs42l42 = dev_get_drvdata(dev); ··· 491 491 return 0; 492 492 } 493 493 494 - static int __maybe_unused cs42l42_sdw_resume(struct device *dev) 494 + static int cs42l42_sdw_resume(struct device *dev) 495 495 { 496 496 struct cs42l42_private *cs42l42 = dev_get_drvdata(dev); 497 497 int ret; ··· 596 596 } 597 597 598 598 static const struct dev_pm_ops cs42l42_sdw_pm = { 599 - SET_SYSTEM_SLEEP_PM_OPS(cs42l42_suspend, cs42l42_sdw_resume) 600 - SET_RUNTIME_PM_OPS(cs42l42_sdw_runtime_suspend, cs42l42_sdw_runtime_resume, NULL) 599 + SYSTEM_SLEEP_PM_OPS(cs42l42_suspend, cs42l42_sdw_resume) 600 + RUNTIME_PM_OPS(cs42l42_sdw_runtime_suspend, cs42l42_sdw_runtime_resume, NULL) 601 601 }; 602 602 603 603 static const struct sdw_device_id cs42l42_sdw_id[] = { ··· 609 609 static struct sdw_driver cs42l42_sdw_driver = { 610 610 .driver = { 611 611 .name = "cs42l42-sdw", 612 - .pm = &cs42l42_sdw_pm, 612 + .pm = pm_ptr(&cs42l42_sdw_pm), 613 613 }, 614 614 .probe = cs42l42_sdw_probe, 615 615 .remove = cs42l42_sdw_remove,
+1 -1
sound/soc/codecs/cs42l51-i2c.c
··· 40 40 } 41 41 42 42 static const struct dev_pm_ops cs42l51_pm_ops = { 43 - SET_SYSTEM_SLEEP_PM_OPS(cs42l51_suspend, cs42l51_resume) 43 + SYSTEM_SLEEP_PM_OPS(cs42l51_suspend, cs42l51_resume) 44 44 }; 45 45 46 46 static struct i2c_driver cs42l51_i2c_driver = {
+2 -2
sound/soc/codecs/cs42l51.c
··· 805 805 } 806 806 EXPORT_SYMBOL_GPL(cs42l51_remove); 807 807 808 - int __maybe_unused cs42l51_suspend(struct device *dev) 808 + int cs42l51_suspend(struct device *dev) 809 809 { 810 810 struct cs42l51_private *cs42l51 = dev_get_drvdata(dev); 811 811 ··· 816 816 } 817 817 EXPORT_SYMBOL_GPL(cs42l51_suspend); 818 818 819 - int __maybe_unused cs42l51_resume(struct device *dev) 819 + int cs42l51_resume(struct device *dev) 820 820 { 821 821 struct cs42l51_private *cs42l51 = dev_get_drvdata(dev); 822 822
+3 -3
sound/soc/codecs/cs42l83-i2c.c
··· 199 199 cs42l42_common_remove(cs42l83); 200 200 } 201 201 202 - static int __maybe_unused cs42l83_i2c_resume(struct device *dev) 202 + static int cs42l83_i2c_resume(struct device *dev) 203 203 { 204 204 int ret; 205 205 ··· 213 213 } 214 214 215 215 static const struct dev_pm_ops cs42l83_i2c_pm_ops = { 216 - SET_SYSTEM_SLEEP_PM_OPS(cs42l42_suspend, cs42l83_i2c_resume) 216 + SYSTEM_SLEEP_PM_OPS(cs42l42_suspend, cs42l83_i2c_resume) 217 217 }; 218 218 219 219 static const struct of_device_id __maybe_unused cs42l83_of_match[] = { ··· 225 225 static struct i2c_driver cs42l83_i2c_driver = { 226 226 .driver = { 227 227 .name = "cs42l83", 228 - .pm = &cs42l83_i2c_pm_ops, 228 + .pm = pm_ptr(&cs42l83_i2c_pm_ops), 229 229 .of_match_table = of_match_ptr(cs42l83_of_match), 230 230 }, 231 231 .probe = cs42l83_i2c_probe,
+1 -1
sound/soc/codecs/cs42xx8-i2c.c
··· 61 61 static struct i2c_driver cs42xx8_i2c_driver = { 62 62 .driver = { 63 63 .name = "cs42xx8", 64 - .pm = &cs42xx8_pm, 64 + .pm = pm_ptr(&cs42xx8_pm), 65 65 .of_match_table = cs42xx8_of_match, 66 66 }, 67 67 .probe = cs42xx8_i2c_probe,
+3 -7
sound/soc/codecs/cs42xx8.c
··· 606 606 } 607 607 EXPORT_SYMBOL_GPL(cs42xx8_probe); 608 608 609 - #ifdef CONFIG_PM 610 609 static int cs42xx8_runtime_resume(struct device *dev) 611 610 { 612 611 struct cs42xx8_priv *cs42xx8 = dev_get_drvdata(dev); ··· 664 665 665 666 return 0; 666 667 } 667 - #endif 668 668 669 - const struct dev_pm_ops cs42xx8_pm = { 670 - SET_SYSTEM_SLEEP_PM_OPS(pm_runtime_force_suspend, 671 - pm_runtime_force_resume) 672 - SET_RUNTIME_PM_OPS(cs42xx8_runtime_suspend, cs42xx8_runtime_resume, NULL) 669 + EXPORT_GPL_DEV_PM_OPS(cs42xx8_pm) = { 670 + SYSTEM_SLEEP_PM_OPS(pm_runtime_force_suspend, pm_runtime_force_resume) 671 + RUNTIME_PM_OPS(cs42xx8_runtime_suspend, cs42xx8_runtime_resume, NULL) 673 672 }; 674 - EXPORT_SYMBOL_GPL(cs42xx8_pm); 675 673 676 674 MODULE_DESCRIPTION("Cirrus Logic CS42448/CS42888 ALSA SoC Codec Driver"); 677 675 MODULE_AUTHOR("Freescale Semiconductor, Inc.");
+4 -5
sound/soc/codecs/cs43130.c
··· 2672 2672 regulator_bulk_disable(CS43130_NUM_SUPPLIES, cs43130->supplies); 2673 2673 } 2674 2674 2675 - static int __maybe_unused cs43130_runtime_suspend(struct device *dev) 2675 + static int cs43130_runtime_suspend(struct device *dev) 2676 2676 { 2677 2677 struct cs43130_private *cs43130 = dev_get_drvdata(dev); 2678 2678 ··· 2691 2691 return 0; 2692 2692 } 2693 2693 2694 - static int __maybe_unused cs43130_runtime_resume(struct device *dev) 2694 + static int cs43130_runtime_resume(struct device *dev) 2695 2695 { 2696 2696 struct cs43130_private *cs43130 = dev_get_drvdata(dev); 2697 2697 int ret; ··· 2727 2727 } 2728 2728 2729 2729 static const struct dev_pm_ops cs43130_runtime_pm = { 2730 - SET_RUNTIME_PM_OPS(cs43130_runtime_suspend, cs43130_runtime_resume, 2731 - NULL) 2730 + RUNTIME_PM_OPS(cs43130_runtime_suspend, cs43130_runtime_resume, NULL) 2732 2731 }; 2733 2732 2734 2733 #if IS_ENABLED(CONFIG_OF) ··· 2767 2768 .name = "cs43130", 2768 2769 .of_match_table = of_match_ptr(cs43130_of_match), 2769 2770 .acpi_match_table = ACPI_PTR(cs43130_acpi_match), 2770 - .pm = &cs43130_runtime_pm, 2771 + .pm = pm_ptr(&cs43130_runtime_pm), 2771 2772 }, 2772 2773 .id_table = cs43130_i2c_id, 2773 2774 .probe = cs43130_i2c_probe,
+2 -5
sound/soc/codecs/cs4349.c
··· 312 312 gpiod_set_value_cansleep(cs4349->reset_gpio, 0); 313 313 } 314 314 315 - #ifdef CONFIG_PM 316 315 static int cs4349_runtime_suspend(struct device *dev) 317 316 { 318 317 struct cs4349_private *cs4349 = dev_get_drvdata(dev); ··· 345 346 346 347 return 0; 347 348 } 348 - #endif 349 349 350 350 static const struct dev_pm_ops cs4349_runtime_pm = { 351 - SET_RUNTIME_PM_OPS(cs4349_runtime_suspend, cs4349_runtime_resume, 352 - NULL) 351 + RUNTIME_PM_OPS(cs4349_runtime_suspend, cs4349_runtime_resume, NULL) 353 352 }; 354 353 355 354 static const struct of_device_id cs4349_of_match[] = { ··· 368 371 .driver = { 369 372 .name = "cs4349", 370 373 .of_match_table = cs4349_of_match, 371 - .pm = &cs4349_runtime_pm, 374 + .pm = pm_ptr(&cs4349_runtime_pm), 372 375 }, 373 376 .id_table = cs4349_i2c_id, 374 377 .probe = cs4349_i2c_probe,
+2 -5
sound/soc/codecs/cs53l30.c
··· 1031 1031 cs53l30->supplies); 1032 1032 } 1033 1033 1034 - #ifdef CONFIG_PM 1035 1034 static int cs53l30_runtime_suspend(struct device *dev) 1036 1035 { 1037 1036 struct cs53l30_private *cs53l30 = dev_get_drvdata(dev); ··· 1069 1070 1070 1071 return 0; 1071 1072 } 1072 - #endif 1073 1073 1074 1074 static const struct dev_pm_ops cs53l30_runtime_pm = { 1075 - SET_RUNTIME_PM_OPS(cs53l30_runtime_suspend, cs53l30_runtime_resume, 1076 - NULL) 1075 + RUNTIME_PM_OPS(cs53l30_runtime_suspend, cs53l30_runtime_resume, NULL) 1077 1076 }; 1078 1077 1079 1078 static const struct of_device_id cs53l30_of_match[] = { ··· 1092 1095 .driver = { 1093 1096 .name = "cs53l30", 1094 1097 .of_match_table = cs53l30_of_match, 1095 - .pm = &cs53l30_runtime_pm, 1098 + .pm = pm_ptr(&cs53l30_runtime_pm), 1096 1099 }, 1097 1100 .id_table = cs53l30_id, 1098 1101 .probe = cs53l30_i2c_probe,
+5 -7
sound/soc/codecs/cx2072x.c
··· 1611 1611 .reg_write = cx2072x_reg_write, 1612 1612 }; 1613 1613 1614 - static int __maybe_unused cx2072x_runtime_suspend(struct device *dev) 1614 + static int cx2072x_runtime_suspend(struct device *dev) 1615 1615 { 1616 1616 struct cx2072x_priv *cx2072x = dev_get_drvdata(dev); 1617 1617 ··· 1619 1619 return 0; 1620 1620 } 1621 1621 1622 - static int __maybe_unused cx2072x_runtime_resume(struct device *dev) 1622 + static int cx2072x_runtime_resume(struct device *dev) 1623 1623 { 1624 1624 struct cx2072x_priv *cx2072x = dev_get_drvdata(dev); 1625 1625 ··· 1696 1696 #endif 1697 1697 1698 1698 static const struct dev_pm_ops cx2072x_runtime_pm = { 1699 - SET_RUNTIME_PM_OPS(cx2072x_runtime_suspend, cx2072x_runtime_resume, 1700 - NULL) 1701 - SET_SYSTEM_SLEEP_PM_OPS(pm_runtime_force_suspend, 1702 - pm_runtime_force_resume) 1699 + RUNTIME_PM_OPS(cx2072x_runtime_suspend, cx2072x_runtime_resume, NULL) 1700 + SYSTEM_SLEEP_PM_OPS(pm_runtime_force_suspend, pm_runtime_force_resume) 1703 1701 }; 1704 1702 1705 1703 static struct i2c_driver cx2072x_i2c_driver = { 1706 1704 .driver = { 1707 1705 .name = "cx2072x", 1708 1706 .acpi_match_table = ACPI_PTR(cx2072x_acpi_match), 1709 - .pm = &cx2072x_runtime_pm, 1707 + .pm = pm_ptr(&cx2072x_runtime_pm), 1710 1708 }, 1711 1709 .probe = cx2072x_i2c_probe, 1712 1710 .remove = cx2072x_i2c_remove,
+5 -5
sound/soc/codecs/da7213.c
··· 2224 2224 pm_runtime_disable(&i2c->dev); 2225 2225 } 2226 2226 2227 - static int __maybe_unused da7213_runtime_suspend(struct device *dev) 2227 + static int da7213_runtime_suspend(struct device *dev) 2228 2228 { 2229 2229 struct da7213_priv *da7213 = dev_get_drvdata(dev); 2230 2230 ··· 2235 2235 return 0; 2236 2236 } 2237 2237 2238 - static int __maybe_unused da7213_runtime_resume(struct device *dev) 2238 + static int da7213_runtime_resume(struct device *dev) 2239 2239 { 2240 2240 struct da7213_priv *da7213 = dev_get_drvdata(dev); 2241 2241 int ret; ··· 2248 2248 } 2249 2249 2250 2250 static const struct dev_pm_ops da7213_pm = { 2251 - SET_RUNTIME_PM_OPS(da7213_runtime_suspend, da7213_runtime_resume, NULL) 2252 - SET_SYSTEM_SLEEP_PM_OPS(pm_runtime_force_suspend, pm_runtime_force_resume) 2251 + RUNTIME_PM_OPS(da7213_runtime_suspend, da7213_runtime_resume, NULL) 2252 + SYSTEM_SLEEP_PM_OPS(pm_runtime_force_suspend, pm_runtime_force_resume) 2253 2253 }; 2254 2254 2255 2255 static const struct i2c_device_id da7213_i2c_id[] = { ··· 2264 2264 .name = "da7213", 2265 2265 .of_match_table = of_match_ptr(da7213_of_match), 2266 2266 .acpi_match_table = ACPI_PTR(da7213_acpi_match), 2267 - .pm = &da7213_pm, 2267 + .pm = pm_ptr(&da7213_pm), 2268 2268 }, 2269 2269 .probe = da7213_i2c_probe, 2270 2270 .remove = da7213_i2c_remove,
+3 -12
sound/soc/codecs/hdac_hdmi.c
··· 2032 2032 pm_runtime_disable(&hdev->dev); 2033 2033 } 2034 2034 2035 - #ifdef CONFIG_PM_SLEEP 2036 2035 static int hdmi_codec_resume(struct device *dev) 2037 2036 { 2038 2037 struct hdac_device *hdev = dev_to_hdac_dev(dev); ··· 2054 2055 hdac_hdmi_present_sense_all_pins(hdev, hdmi, false); 2055 2056 return 0; 2056 2057 } 2057 - #else 2058 - #define hdmi_codec_resume NULL 2059 - #endif 2060 2058 2061 2059 static const struct snd_soc_component_driver hdmi_hda_codec = { 2062 2060 .probe = hdmi_codec_probe, ··· 2223 2227 return 0; 2224 2228 } 2225 2229 2226 - #ifdef CONFIG_PM 2227 2230 static int hdac_hdmi_runtime_suspend(struct device *dev) 2228 2231 { 2229 2232 struct hdac_device *hdev = dev_to_hdac_dev(dev); ··· 2291 2296 2292 2297 return 0; 2293 2298 } 2294 - #else 2295 - #define hdac_hdmi_runtime_suspend NULL 2296 - #define hdac_hdmi_runtime_resume NULL 2297 - #endif 2298 2299 2299 2300 static const struct dev_pm_ops hdac_hdmi_pm = { 2300 - SET_RUNTIME_PM_OPS(hdac_hdmi_runtime_suspend, hdac_hdmi_runtime_resume, NULL) 2301 - SET_SYSTEM_SLEEP_PM_OPS(pm_runtime_force_suspend, hdmi_codec_resume) 2301 + RUNTIME_PM_OPS(hdac_hdmi_runtime_suspend, hdac_hdmi_runtime_resume, NULL) 2302 + SYSTEM_SLEEP_PM_OPS(pm_runtime_force_suspend, hdmi_codec_resume) 2302 2303 }; 2303 2304 2304 2305 static const struct hda_device_id hdmi_list[] = { ··· 2313 2322 static struct hdac_driver hdmi_driver = { 2314 2323 .driver = { 2315 2324 .name = "HDMI HDA Codec", 2316 - .pm = &hdac_hdmi_pm, 2325 + .pm = pm_ptr(&hdac_hdmi_pm), 2317 2326 }, 2318 2327 .id_table = hdmi_list, 2319 2328 .probe = hdac_hdmi_dev_probe,
+4 -4
sound/soc/codecs/lpass-rx-macro.c
··· 3963 3963 }; 3964 3964 MODULE_DEVICE_TABLE(of, rx_macro_dt_match); 3965 3965 3966 - static int __maybe_unused rx_macro_runtime_suspend(struct device *dev) 3966 + static int rx_macro_runtime_suspend(struct device *dev) 3967 3967 { 3968 3968 struct rx_macro *rx = dev_get_drvdata(dev); 3969 3969 ··· 3977 3977 return 0; 3978 3978 } 3979 3979 3980 - static int __maybe_unused rx_macro_runtime_resume(struct device *dev) 3980 + static int rx_macro_runtime_resume(struct device *dev) 3981 3981 { 3982 3982 struct rx_macro *rx = dev_get_drvdata(dev); 3983 3983 int ret; ··· 4012 4012 } 4013 4013 4014 4014 static const struct dev_pm_ops rx_macro_pm_ops = { 4015 - SET_RUNTIME_PM_OPS(rx_macro_runtime_suspend, rx_macro_runtime_resume, NULL) 4015 + RUNTIME_PM_OPS(rx_macro_runtime_suspend, rx_macro_runtime_resume, NULL) 4016 4016 }; 4017 4017 4018 4018 static struct platform_driver rx_macro_driver = { ··· 4020 4020 .name = "rx_macro", 4021 4021 .of_match_table = rx_macro_dt_match, 4022 4022 .suppress_bind_attrs = true, 4023 - .pm = &rx_macro_pm_ops, 4023 + .pm = pm_ptr(&rx_macro_pm_ops), 4024 4024 }, 4025 4025 .probe = rx_macro_probe, 4026 4026 .remove = rx_macro_remove,
+4 -4
sound/soc/codecs/lpass-tx-macro.c
··· 2400 2400 lpass_macro_pds_exit(tx->pds); 2401 2401 } 2402 2402 2403 - static int __maybe_unused tx_macro_runtime_suspend(struct device *dev) 2403 + static int tx_macro_runtime_suspend(struct device *dev) 2404 2404 { 2405 2405 struct tx_macro *tx = dev_get_drvdata(dev); 2406 2406 ··· 2414 2414 return 0; 2415 2415 } 2416 2416 2417 - static int __maybe_unused tx_macro_runtime_resume(struct device *dev) 2417 + static int tx_macro_runtime_resume(struct device *dev) 2418 2418 { 2419 2419 struct tx_macro *tx = dev_get_drvdata(dev); 2420 2420 int ret; ··· 2450 2450 } 2451 2451 2452 2452 static const struct dev_pm_ops tx_macro_pm_ops = { 2453 - SET_RUNTIME_PM_OPS(tx_macro_runtime_suspend, tx_macro_runtime_resume, NULL) 2453 + RUNTIME_PM_OPS(tx_macro_runtime_suspend, tx_macro_runtime_resume, NULL) 2454 2454 }; 2455 2455 2456 2456 static const struct tx_macro_data lpass_ver_9 = { ··· 2531 2531 .name = "tx_macro", 2532 2532 .of_match_table = tx_macro_dt_match, 2533 2533 .suppress_bind_attrs = true, 2534 - .pm = &tx_macro_pm_ops, 2534 + .pm = pm_ptr(&tx_macro_pm_ops), 2535 2535 }, 2536 2536 .probe = tx_macro_probe, 2537 2537 .remove = tx_macro_remove,
+4 -4
sound/soc/codecs/lpass-va-macro.c
··· 1674 1674 lpass_macro_pds_exit(va->pds); 1675 1675 } 1676 1676 1677 - static int __maybe_unused va_macro_runtime_suspend(struct device *dev) 1677 + static int va_macro_runtime_suspend(struct device *dev) 1678 1678 { 1679 1679 struct va_macro *va = dev_get_drvdata(dev); 1680 1680 ··· 1689 1689 return 0; 1690 1690 } 1691 1691 1692 - static int __maybe_unused va_macro_runtime_resume(struct device *dev) 1692 + static int va_macro_runtime_resume(struct device *dev) 1693 1693 { 1694 1694 struct va_macro *va = dev_get_drvdata(dev); 1695 1695 int ret; ··· 1717 1717 1718 1718 1719 1719 static const struct dev_pm_ops va_macro_pm_ops = { 1720 - SET_RUNTIME_PM_OPS(va_macro_runtime_suspend, va_macro_runtime_resume, NULL) 1720 + RUNTIME_PM_OPS(va_macro_runtime_suspend, va_macro_runtime_resume, NULL) 1721 1721 }; 1722 1722 1723 1723 static const struct of_device_id va_macro_dt_match[] = { ··· 1735 1735 .name = "va_macro", 1736 1736 .of_match_table = va_macro_dt_match, 1737 1737 .suppress_bind_attrs = true, 1738 - .pm = &va_macro_pm_ops, 1738 + .pm = pm_ptr(&va_macro_pm_ops), 1739 1739 }, 1740 1740 .probe = va_macro_probe, 1741 1741 .remove = va_macro_remove,
+4 -4
sound/soc/codecs/lpass-wsa-macro.c
··· 2900 2900 clk_disable_unprepare(wsa->fsgen); 2901 2901 } 2902 2902 2903 - static int __maybe_unused wsa_macro_runtime_suspend(struct device *dev) 2903 + static int wsa_macro_runtime_suspend(struct device *dev) 2904 2904 { 2905 2905 struct wsa_macro *wsa = dev_get_drvdata(dev); 2906 2906 ··· 2914 2914 return 0; 2915 2915 } 2916 2916 2917 - static int __maybe_unused wsa_macro_runtime_resume(struct device *dev) 2917 + static int wsa_macro_runtime_resume(struct device *dev) 2918 2918 { 2919 2919 struct wsa_macro *wsa = dev_get_drvdata(dev); 2920 2920 int ret; ··· 2950 2950 } 2951 2951 2952 2952 static const struct dev_pm_ops wsa_macro_pm_ops = { 2953 - SET_RUNTIME_PM_OPS(wsa_macro_runtime_suspend, wsa_macro_runtime_resume, NULL) 2953 + RUNTIME_PM_OPS(wsa_macro_runtime_suspend, wsa_macro_runtime_resume, NULL) 2954 2954 }; 2955 2955 2956 2956 static const struct of_device_id wsa_macro_dt_match[] = { ··· 2977 2977 .driver = { 2978 2978 .name = "wsa_macro", 2979 2979 .of_match_table = wsa_macro_dt_match, 2980 - .pm = &wsa_macro_pm_ops, 2980 + .pm = pm_ptr(&wsa_macro_pm_ops), 2981 2981 }, 2982 2982 .probe = wsa_macro_probe, 2983 2983 .remove = wsa_macro_remove,
+3 -8
sound/soc/codecs/max98090.c
··· 2604 2604 max98090_i2c_shutdown(client); 2605 2605 } 2606 2606 2607 - #ifdef CONFIG_PM 2608 2607 static int max98090_runtime_resume(struct device *dev) 2609 2608 { 2610 2609 struct max98090_priv *max98090 = dev_get_drvdata(dev); ··· 2625 2626 2626 2627 return 0; 2627 2628 } 2628 - #endif 2629 2629 2630 - #ifdef CONFIG_PM_SLEEP 2631 2630 static int max98090_resume(struct device *dev) 2632 2631 { 2633 2632 struct max98090_priv *max98090 = dev_get_drvdata(dev); ··· 2642 2645 2643 2646 return 0; 2644 2647 } 2645 - #endif 2646 2648 2647 2649 static const struct dev_pm_ops max98090_pm = { 2648 - SET_RUNTIME_PM_OPS(max98090_runtime_suspend, 2649 - max98090_runtime_resume, NULL) 2650 - SET_SYSTEM_SLEEP_PM_OPS(NULL, max98090_resume) 2650 + RUNTIME_PM_OPS(max98090_runtime_suspend, max98090_runtime_resume, NULL) 2651 + SYSTEM_SLEEP_PM_OPS(NULL, max98090_resume) 2651 2652 }; 2652 2653 2653 2654 #ifdef CONFIG_OF ··· 2668 2673 static struct i2c_driver max98090_i2c_driver = { 2669 2674 .driver = { 2670 2675 .name = "max98090", 2671 - .pm = &max98090_pm, 2676 + .pm = pm_ptr(&max98090_pm), 2672 2677 .of_match_table = of_match_ptr(max98090_of_match), 2673 2678 .acpi_match_table = ACPI_PTR(max98090_acpi_match), 2674 2679 },
+2 -4
sound/soc/codecs/max98373-i2c.c
··· 472 472 } 473 473 }; 474 474 475 - #ifdef CONFIG_PM_SLEEP 476 475 static int max98373_suspend(struct device *dev) 477 476 { 478 477 struct max98373_priv *max98373 = dev_get_drvdata(dev); ··· 495 496 regcache_sync(max98373->regmap); 496 497 return 0; 497 498 } 498 - #endif 499 499 500 500 static const struct dev_pm_ops max98373_pm = { 501 - SET_SYSTEM_SLEEP_PM_OPS(max98373_suspend, max98373_resume) 501 + SYSTEM_SLEEP_PM_OPS(max98373_suspend, max98373_resume) 502 502 }; 503 503 504 504 static const struct regmap_config max98373_regmap = { ··· 603 605 .name = "max98373", 604 606 .of_match_table = of_match_ptr(max98373_of_match), 605 607 .acpi_match_table = ACPI_PTR(max98373_acpi_match), 606 - .pm = &max98373_pm, 608 + .pm = pm_ptr(&max98373_pm), 607 609 }, 608 610 .probe = max98373_i2c_probe, 609 611 .id_table = max98373_i2c_id,
+5 -5
sound/soc/codecs/max98373-sdw.c
··· 246 246 }; 247 247 248 248 /* Power management functions and structure */ 249 - static __maybe_unused int max98373_suspend(struct device *dev) 249 + static int max98373_suspend(struct device *dev) 250 250 { 251 251 struct max98373_priv *max98373 = dev_get_drvdata(dev); 252 252 int i; ··· 262 262 263 263 #define MAX98373_PROBE_TIMEOUT 5000 264 264 265 - static __maybe_unused int max98373_resume(struct device *dev) 265 + static int max98373_resume(struct device *dev) 266 266 { 267 267 struct sdw_slave *slave = dev_to_sdw_dev(dev); 268 268 struct max98373_priv *max98373 = dev_get_drvdata(dev); ··· 292 292 } 293 293 294 294 static const struct dev_pm_ops max98373_pm = { 295 - SET_SYSTEM_SLEEP_PM_OPS(max98373_suspend, max98373_resume) 296 - SET_RUNTIME_PM_OPS(max98373_suspend, max98373_resume, NULL) 295 + SYSTEM_SLEEP_PM_OPS(max98373_suspend, max98373_resume) 296 + RUNTIME_PM_OPS(max98373_suspend, max98373_resume, NULL) 297 297 }; 298 298 299 299 static int max98373_read_prop(struct sdw_slave *slave) ··· 874 874 .name = "max98373", 875 875 .of_match_table = of_match_ptr(max98373_of_match), 876 876 .acpi_match_table = ACPI_PTR(max98373_acpi_match), 877 - .pm = &max98373_pm, 877 + .pm = pm_ptr(&max98373_pm), 878 878 }, 879 879 .probe = max98373_sdw_probe, 880 880 .remove = max98373_sdw_remove,
+2 -4
sound/soc/codecs/max98390.c
··· 943 943 return 0; 944 944 } 945 945 946 - #ifdef CONFIG_PM_SLEEP 947 946 static int max98390_suspend(struct device *dev) 948 947 { 949 948 struct max98390_priv *max98390 = dev_get_drvdata(dev); ··· 966 967 967 968 return 0; 968 969 } 969 - #endif 970 970 971 971 static const struct dev_pm_ops max98390_pm = { 972 - SET_SYSTEM_SLEEP_PM_OPS(max98390_suspend, max98390_resume) 972 + SYSTEM_SLEEP_PM_OPS(max98390_suspend, max98390_resume) 973 973 }; 974 974 975 975 static const struct snd_soc_component_driver soc_codec_dev_max98390 = { ··· 1128 1130 .name = "max98390", 1129 1131 .of_match_table = of_match_ptr(max98390_of_match), 1130 1132 .acpi_match_table = ACPI_PTR(max98390_acpi_match), 1131 - .pm = &max98390_pm, 1133 + .pm = pm_ptr(&max98390_pm), 1132 1134 }, 1133 1135 .probe = max98390_i2c_probe, 1134 1136 .id_table = max98390_i2c_id,
+2 -4
sound/soc/codecs/max98396.c
··· 1571 1571 return 0; 1572 1572 } 1573 1573 1574 - #ifdef CONFIG_PM_SLEEP 1575 1574 static int max98396_suspend(struct device *dev) 1576 1575 { 1577 1576 struct max98396_priv *max98396 = dev_get_drvdata(dev); ··· 1615 1616 regcache_sync(max98396->regmap); 1616 1617 return 0; 1617 1618 } 1618 - #endif 1619 1619 1620 1620 static const struct dev_pm_ops max98396_pm = { 1621 - SET_SYSTEM_SLEEP_PM_OPS(max98396_suspend, max98396_resume) 1621 + SYSTEM_SLEEP_PM_OPS(max98396_suspend, max98396_resume) 1622 1622 }; 1623 1623 1624 1624 static const struct snd_soc_component_driver soc_codec_dev_max98396 = { ··· 1902 1904 .name = "max98396", 1903 1905 .of_match_table = of_match_ptr(max98396_of_match), 1904 1906 .acpi_match_table = ACPI_PTR(max98396_acpi_match), 1905 - .pm = &max98396_pm, 1907 + .pm = pm_ptr(&max98396_pm), 1906 1908 }, 1907 1909 .probe = max98396_i2c_probe, 1908 1910 .id_table = max98396_i2c_id,
+4 -4
sound/soc/codecs/max98520.c
··· 621 621 return 0; 622 622 } 623 623 624 - static int __maybe_unused max98520_suspend(struct device *dev) 624 + static int max98520_suspend(struct device *dev) 625 625 { 626 626 struct max98520_priv *max98520 = dev_get_drvdata(dev); 627 627 ··· 630 630 return 0; 631 631 } 632 632 633 - static int __maybe_unused max98520_resume(struct device *dev) 633 + static int max98520_resume(struct device *dev) 634 634 { 635 635 struct max98520_priv *max98520 = dev_get_drvdata(dev); 636 636 ··· 641 641 } 642 642 643 643 static const struct dev_pm_ops max98520_pm = { 644 - SET_SYSTEM_SLEEP_PM_OPS(max98520_suspend, max98520_resume) 644 + SYSTEM_SLEEP_PM_OPS(max98520_suspend, max98520_resume) 645 645 }; 646 646 647 647 static const struct snd_soc_component_driver soc_codec_dev_max98520 = { ··· 752 752 .driver = { 753 753 .name = "max98520", 754 754 .of_match_table = of_match_ptr(max98520_of_match), 755 - .pm = &max98520_pm, 755 + .pm = pm_ptr(&max98520_pm), 756 756 }, 757 757 .probe = max98520_i2c_probe, 758 758 .id_table = max98520_i2c_id,
+2 -4
sound/soc/codecs/max9860.c
··· 539 539 .endianness = 1, 540 540 }; 541 541 542 - #ifdef CONFIG_PM 543 542 static int max9860_suspend(struct device *dev) 544 543 { 545 544 struct max9860_priv *max9860 = dev_get_drvdata(dev); ··· 583 584 584 585 return 0; 585 586 } 586 - #endif 587 587 588 588 static const struct dev_pm_ops max9860_pm_ops = { 589 - SET_RUNTIME_PM_OPS(max9860_suspend, max9860_resume, NULL) 589 + RUNTIME_PM_OPS(max9860_suspend, max9860_resume, NULL) 590 590 }; 591 591 592 592 static int max9860_probe(struct i2c_client *i2c) ··· 727 729 .driver = { 728 730 .name = "max9860", 729 731 .of_match_table = max9860_of_match, 730 - .pm = &max9860_pm_ops, 732 + .pm = pm_ptr(&max9860_pm_ops), 731 733 }, 732 734 }; 733 735
+2 -4
sound/soc/codecs/max98927.c
··· 731 731 return 0; 732 732 } 733 733 734 - #ifdef CONFIG_PM_SLEEP 735 734 static int max98927_suspend(struct device *dev) 736 735 { 737 736 struct max98927_priv *max98927 = dev_get_drvdata(dev); ··· 749 750 regcache_sync(max98927->regmap); 750 751 return 0; 751 752 } 752 - #endif 753 753 754 754 static const struct dev_pm_ops max98927_pm = { 755 - SET_SYSTEM_SLEEP_PM_OPS(max98927_suspend, max98927_resume) 755 + SYSTEM_SLEEP_PM_OPS(max98927_suspend, max98927_resume) 756 756 }; 757 757 758 758 static const struct snd_soc_component_driver soc_component_dev_max98927 = { ··· 900 902 .name = "max98927", 901 903 .of_match_table = of_match_ptr(max98927_of_match), 902 904 .acpi_match_table = ACPI_PTR(max98927_acpi_match), 903 - .pm = &max98927_pm, 905 + .pm = pm_ptr(&max98927_pm), 904 906 }, 905 907 .probe = max98927_i2c_probe, 906 908 .remove = max98927_i2c_remove,
+4 -5
sound/soc/codecs/mt6660.c
··· 529 529 mutex_destroy(&chip->io_lock); 530 530 } 531 531 532 - static int __maybe_unused mt6660_i2c_runtime_suspend(struct device *dev) 532 + static int mt6660_i2c_runtime_suspend(struct device *dev) 533 533 { 534 534 struct mt6660_chip *chip = dev_get_drvdata(dev); 535 535 ··· 538 538 MT6660_REG_SYSTEM_CTRL, 0x01, 0x01); 539 539 } 540 540 541 - static int __maybe_unused mt6660_i2c_runtime_resume(struct device *dev) 541 + static int mt6660_i2c_runtime_resume(struct device *dev) 542 542 { 543 543 struct mt6660_chip *chip = dev_get_drvdata(dev); 544 544 ··· 548 548 } 549 549 550 550 static const struct dev_pm_ops mt6660_dev_pm_ops = { 551 - SET_RUNTIME_PM_OPS(mt6660_i2c_runtime_suspend, 552 - mt6660_i2c_runtime_resume, NULL) 551 + RUNTIME_PM_OPS(mt6660_i2c_runtime_suspend, mt6660_i2c_runtime_resume, NULL) 553 552 }; 554 553 555 554 static const struct of_device_id __maybe_unused mt6660_of_id[] = { ··· 567 568 .driver = { 568 569 .name = "mt6660", 569 570 .of_match_table = of_match_ptr(mt6660_of_id), 570 - .pm = &mt6660_dev_pm_ops, 571 + .pm = pm_ptr(&mt6660_dev_pm_ops), 571 572 }, 572 573 .probe = mt6660_i2c_probe, 573 574 .remove = mt6660_i2c_remove,
+1 -1
sound/soc/codecs/pcm3168a-i2c.c
··· 59 59 .name = "pcm3168a", 60 60 .acpi_match_table = pcm3168a_acpi_match, 61 61 .of_match_table = pcm3168a_of_match, 62 - .pm = &pcm3168a_pm_ops, 62 + .pm = pm_ptr(&pcm3168a_pm_ops), 63 63 }, 64 64 }; 65 65 module_i2c_driver(pcm3168a_i2c_driver);
+1 -1
sound/soc/codecs/pcm3168a-spi.c
··· 50 50 .driver = { 51 51 .name = "pcm3168a", 52 52 .of_match_table = pcm3168a_of_match, 53 - .pm = &pcm3168a_pm_ops, 53 + .pm = pm_ptr(&pcm3168a_pm_ops), 54 54 }, 55 55 }; 56 56 module_spi_driver(pcm3168a_spi_driver);
+2 -5
sound/soc/codecs/pcm3168a.c
··· 849 849 } 850 850 EXPORT_SYMBOL_GPL(pcm3168a_remove); 851 851 852 - #ifdef CONFIG_PM 853 852 static int pcm3168a_rt_resume(struct device *dev) 854 853 { 855 854 struct pcm3168a_priv *pcm3168a = dev_get_drvdata(dev); ··· 904 905 905 906 return 0; 906 907 } 907 - #endif 908 908 909 - const struct dev_pm_ops pcm3168a_pm_ops = { 910 - SET_RUNTIME_PM_OPS(pcm3168a_rt_suspend, pcm3168a_rt_resume, NULL) 909 + EXPORT_GPL_DEV_PM_OPS(pcm3168a_pm_ops) = { 910 + RUNTIME_PM_OPS(pcm3168a_rt_suspend, pcm3168a_rt_resume, NULL) 911 911 }; 912 - EXPORT_SYMBOL_GPL(pcm3168a_pm_ops); 913 912 914 913 MODULE_DESCRIPTION("PCM3168A codec driver"); 915 914 MODULE_AUTHOR("Damien Horsley <Damien.Horsley@imgtec.com>");
+1 -1
sound/soc/codecs/pcm512x-i2c.c
··· 79 79 .name = "pcm512x", 80 80 .of_match_table = of_match_ptr(pcm512x_of_match), 81 81 .acpi_match_table = ACPI_PTR(pcm512x_acpi_match), 82 - .pm = &pcm512x_pm_ops, 82 + .pm = pm_ptr(&pcm512x_pm_ops), 83 83 }, 84 84 }; 85 85
+1 -1
sound/soc/codecs/pcm512x-spi.c
··· 58 58 .driver = { 59 59 .name = "pcm512x", 60 60 .of_match_table = pcm512x_of_match, 61 - .pm = &pcm512x_pm_ops, 61 + .pm = pm_ptr(&pcm512x_pm_ops), 62 62 }, 63 63 }; 64 64
+2 -5
sound/soc/codecs/pcm512x.c
··· 1725 1725 } 1726 1726 EXPORT_SYMBOL_GPL(pcm512x_remove); 1727 1727 1728 - #ifdef CONFIG_PM 1729 1728 static int pcm512x_suspend(struct device *dev) 1730 1729 { 1731 1730 struct pcm512x_priv *pcm512x = dev_get_drvdata(dev); ··· 1786 1787 1787 1788 return 0; 1788 1789 } 1789 - #endif 1790 1790 1791 - const struct dev_pm_ops pcm512x_pm_ops = { 1792 - SET_RUNTIME_PM_OPS(pcm512x_suspend, pcm512x_resume, NULL) 1791 + EXPORT_GPL_DEV_PM_OPS(pcm512x_pm_ops) = { 1792 + RUNTIME_PM_OPS(pcm512x_suspend, pcm512x_resume, NULL) 1793 1793 }; 1794 - EXPORT_SYMBOL_GPL(pcm512x_pm_ops); 1795 1794 1796 1795 MODULE_DESCRIPTION("ASoC PCM512x codec driver"); 1797 1796 MODULE_AUTHOR("Mark Brown <broonie@kernel.org>");
+5 -5
sound/soc/codecs/rt1017-sdca-sdw.c
··· 758 758 }; 759 759 MODULE_DEVICE_TABLE(sdw, rt1017_sdca_id); 760 760 761 - static int __maybe_unused rt1017_sdca_dev_suspend(struct device *dev) 761 + static int rt1017_sdca_dev_suspend(struct device *dev) 762 762 { 763 763 struct rt1017_sdca_priv *rt1017 = dev_get_drvdata(dev); 764 764 ··· 772 772 773 773 #define RT1017_PROBE_TIMEOUT 5000 774 774 775 - static int __maybe_unused rt1017_sdca_dev_resume(struct device *dev) 775 + static int rt1017_sdca_dev_resume(struct device *dev) 776 776 { 777 777 struct sdw_slave *slave = dev_to_sdw_dev(dev); 778 778 struct rt1017_sdca_priv *rt1017 = dev_get_drvdata(dev); ··· 802 802 } 803 803 804 804 static const struct dev_pm_ops rt1017_sdca_pm = { 805 - SET_SYSTEM_SLEEP_PM_OPS(rt1017_sdca_dev_suspend, rt1017_sdca_dev_resume) 806 - SET_RUNTIME_PM_OPS(rt1017_sdca_dev_suspend, rt1017_sdca_dev_resume, NULL) 805 + SYSTEM_SLEEP_PM_OPS(rt1017_sdca_dev_suspend, rt1017_sdca_dev_resume) 806 + RUNTIME_PM_OPS(rt1017_sdca_dev_suspend, rt1017_sdca_dev_resume, NULL) 807 807 }; 808 808 809 809 static struct sdw_driver rt1017_sdca_sdw_driver = { 810 810 .driver = { 811 811 .name = "rt1017-sdca", 812 - .pm = &rt1017_sdca_pm, 812 + .pm = pm_ptr(&rt1017_sdca_pm), 813 813 }, 814 814 .probe = rt1017_sdca_sdw_probe, 815 815 .remove = rt1017_sdca_sdw_remove,
+5 -5
sound/soc/codecs/rt1308-sdw.c
··· 753 753 }; 754 754 MODULE_DEVICE_TABLE(sdw, rt1308_id); 755 755 756 - static int __maybe_unused rt1308_dev_suspend(struct device *dev) 756 + static int rt1308_dev_suspend(struct device *dev) 757 757 { 758 758 struct rt1308_sdw_priv *rt1308 = dev_get_drvdata(dev); 759 759 ··· 767 767 768 768 #define RT1308_PROBE_TIMEOUT 5000 769 769 770 - static int __maybe_unused rt1308_dev_resume(struct device *dev) 770 + static int rt1308_dev_resume(struct device *dev) 771 771 { 772 772 struct sdw_slave *slave = dev_to_sdw_dev(dev); 773 773 struct rt1308_sdw_priv *rt1308 = dev_get_drvdata(dev); ··· 797 797 } 798 798 799 799 static const struct dev_pm_ops rt1308_pm = { 800 - SET_SYSTEM_SLEEP_PM_OPS(rt1308_dev_suspend, rt1308_dev_resume) 801 - SET_RUNTIME_PM_OPS(rt1308_dev_suspend, rt1308_dev_resume, NULL) 800 + SYSTEM_SLEEP_PM_OPS(rt1308_dev_suspend, rt1308_dev_resume) 801 + RUNTIME_PM_OPS(rt1308_dev_suspend, rt1308_dev_resume, NULL) 802 802 }; 803 803 804 804 static struct sdw_driver rt1308_sdw_driver = { 805 805 .driver = { 806 806 .name = "rt1308", 807 - .pm = &rt1308_pm, 807 + .pm = pm_ptr(&rt1308_pm), 808 808 }, 809 809 .probe = rt1308_sdw_probe, 810 810 .remove = rt1308_sdw_remove,
+5 -5
sound/soc/codecs/rt1316-sdw.c
··· 730 730 }; 731 731 MODULE_DEVICE_TABLE(sdw, rt1316_id); 732 732 733 - static int __maybe_unused rt1316_dev_suspend(struct device *dev) 733 + static int rt1316_dev_suspend(struct device *dev) 734 734 { 735 735 struct rt1316_sdw_priv *rt1316 = dev_get_drvdata(dev); 736 736 ··· 744 744 745 745 #define RT1316_PROBE_TIMEOUT 5000 746 746 747 - static int __maybe_unused rt1316_dev_resume(struct device *dev) 747 + static int rt1316_dev_resume(struct device *dev) 748 748 { 749 749 struct sdw_slave *slave = dev_to_sdw_dev(dev); 750 750 struct rt1316_sdw_priv *rt1316 = dev_get_drvdata(dev); ··· 774 774 } 775 775 776 776 static const struct dev_pm_ops rt1316_pm = { 777 - SET_SYSTEM_SLEEP_PM_OPS(rt1316_dev_suspend, rt1316_dev_resume) 778 - SET_RUNTIME_PM_OPS(rt1316_dev_suspend, rt1316_dev_resume, NULL) 777 + SYSTEM_SLEEP_PM_OPS(rt1316_dev_suspend, rt1316_dev_resume) 778 + RUNTIME_PM_OPS(rt1316_dev_suspend, rt1316_dev_resume, NULL) 779 779 }; 780 780 781 781 static struct sdw_driver rt1316_sdw_driver = { 782 782 .driver = { 783 783 .name = "rt1316-sdca", 784 - .pm = &rt1316_pm, 784 + .pm = pm_ptr(&rt1316_pm), 785 785 }, 786 786 .probe = rt1316_sdw_probe, 787 787 .remove = rt1316_sdw_remove,
+5 -5
sound/soc/codecs/rt1318-sdw.c
··· 807 807 }; 808 808 MODULE_DEVICE_TABLE(sdw, rt1318_id); 809 809 810 - static int __maybe_unused rt1318_dev_suspend(struct device *dev) 810 + static int rt1318_dev_suspend(struct device *dev) 811 811 { 812 812 struct rt1318_sdw_priv *rt1318 = dev_get_drvdata(dev); 813 813 ··· 820 820 821 821 #define RT1318_PROBE_TIMEOUT 5000 822 822 823 - static int __maybe_unused rt1318_dev_resume(struct device *dev) 823 + static int rt1318_dev_resume(struct device *dev) 824 824 { 825 825 struct sdw_slave *slave = dev_to_sdw_dev(dev); 826 826 struct rt1318_sdw_priv *rt1318 = dev_get_drvdata(dev); ··· 848 848 } 849 849 850 850 static const struct dev_pm_ops rt1318_pm = { 851 - SET_SYSTEM_SLEEP_PM_OPS(rt1318_dev_suspend, rt1318_dev_resume) 852 - SET_RUNTIME_PM_OPS(rt1318_dev_suspend, rt1318_dev_resume, NULL) 851 + SYSTEM_SLEEP_PM_OPS(rt1318_dev_suspend, rt1318_dev_resume) 852 + RUNTIME_PM_OPS(rt1318_dev_suspend, rt1318_dev_resume, NULL) 853 853 }; 854 854 855 855 static struct sdw_driver rt1318_sdw_driver = { 856 856 .driver = { 857 857 .name = "rt1318-sdca", 858 - .pm = &rt1318_pm, 858 + .pm = pm_ptr(&rt1318_pm), 859 859 }, 860 860 .probe = rt1318_sdw_probe, 861 861 .remove = rt1318_sdw_remove,
+5 -5
sound/soc/codecs/rt1320-sdw.c
··· 1458 1458 }; 1459 1459 MODULE_DEVICE_TABLE(sdw, rt1320_id); 1460 1460 1461 - static int __maybe_unused rt1320_dev_suspend(struct device *dev) 1461 + static int rt1320_dev_suspend(struct device *dev) 1462 1462 { 1463 1463 struct rt1320_sdw_priv *rt1320 = dev_get_drvdata(dev); 1464 1464 ··· 1472 1472 1473 1473 #define RT1320_PROBE_TIMEOUT 5000 1474 1474 1475 - static int __maybe_unused rt1320_dev_resume(struct device *dev) 1475 + static int rt1320_dev_resume(struct device *dev) 1476 1476 { 1477 1477 struct sdw_slave *slave = dev_to_sdw_dev(dev); 1478 1478 struct rt1320_sdw_priv *rt1320 = dev_get_drvdata(dev); ··· 1501 1501 } 1502 1502 1503 1503 static const struct dev_pm_ops rt1320_pm = { 1504 - SET_SYSTEM_SLEEP_PM_OPS(rt1320_dev_suspend, rt1320_dev_resume) 1505 - SET_RUNTIME_PM_OPS(rt1320_dev_suspend, rt1320_dev_resume, NULL) 1504 + SYSTEM_SLEEP_PM_OPS(rt1320_dev_suspend, rt1320_dev_resume) 1505 + RUNTIME_PM_OPS(rt1320_dev_suspend, rt1320_dev_resume, NULL) 1506 1506 }; 1507 1507 1508 1508 static struct sdw_driver rt1320_sdw_driver = { 1509 1509 .driver = { 1510 1510 .name = "rt1320-sdca", 1511 - .pm = &rt1320_pm, 1511 + .pm = pm_ptr(&rt1320_pm), 1512 1512 }, 1513 1513 .probe = rt1320_sdw_probe, 1514 1514 .remove = rt1320_sdw_remove,
+4 -4
sound/soc/codecs/rt5514-spi.c
··· 458 458 return 0; 459 459 } 460 460 461 - static int __maybe_unused rt5514_suspend(struct device *dev) 461 + static int rt5514_suspend(struct device *dev) 462 462 { 463 463 int irq = to_spi_device(dev)->irq; 464 464 ··· 468 468 return 0; 469 469 } 470 470 471 - static int __maybe_unused rt5514_resume(struct device *dev) 471 + static int rt5514_resume(struct device *dev) 472 472 { 473 473 struct rt5514_dsp *rt5514_dsp = dev_get_drvdata(dev); 474 474 int irq = to_spi_device(dev)->irq; ··· 490 490 } 491 491 492 492 static const struct dev_pm_ops rt5514_pm_ops = { 493 - SET_SYSTEM_SLEEP_PM_OPS(rt5514_suspend, rt5514_resume) 493 + SYSTEM_SLEEP_PM_OPS(rt5514_suspend, rt5514_resume) 494 494 }; 495 495 496 496 static const struct of_device_id rt5514_of_match[] = { ··· 502 502 static struct spi_driver rt5514_spi_driver = { 503 503 .driver = { 504 504 .name = "rt5514", 505 - .pm = &rt5514_pm_ops, 505 + .pm = pm_ptr(&rt5514_pm_ops), 506 506 .of_match_table = of_match_ptr(rt5514_of_match), 507 507 }, 508 508 .probe = rt5514_spi_probe,
+3 -3
sound/soc/codecs/rt5514.c
··· 1231 1231 return 0; 1232 1232 } 1233 1233 1234 - static __maybe_unused int rt5514_i2c_resume(struct device *dev) 1234 + static int rt5514_i2c_resume(struct device *dev) 1235 1235 { 1236 1236 struct rt5514_priv *rt5514 = dev_get_drvdata(dev); 1237 1237 unsigned int val; ··· 1313 1313 } 1314 1314 1315 1315 static const struct dev_pm_ops rt5514_i2_pm_ops = { 1316 - SET_SYSTEM_SLEEP_PM_OPS(NULL, rt5514_i2c_resume) 1316 + SYSTEM_SLEEP_PM_OPS(NULL, rt5514_i2c_resume) 1317 1317 }; 1318 1318 1319 1319 static struct i2c_driver rt5514_i2c_driver = { ··· 1321 1321 .name = "rt5514", 1322 1322 .acpi_match_table = ACPI_PTR(rt5514_acpi_match), 1323 1323 .of_match_table = of_match_ptr(rt5514_of_match), 1324 - .pm = &rt5514_i2_pm_ops, 1324 + .pm = pm_ptr(&rt5514_i2_pm_ops), 1325 1325 }, 1326 1326 .probe = rt5514_i2c_probe, 1327 1327 .id_table = rt5514_i2c_id,
+4 -4
sound/soc/codecs/rt5645.c
··· 4314 4314 gpiod_set_value(rt5645->gpiod_cbj_sleeve, 0); 4315 4315 } 4316 4316 4317 - static int __maybe_unused rt5645_sys_suspend(struct device *dev) 4317 + static int rt5645_sys_suspend(struct device *dev) 4318 4318 { 4319 4319 struct rt5645_priv *rt5645 = dev_get_drvdata(dev); 4320 4320 ··· 4327 4327 return 0; 4328 4328 } 4329 4329 4330 - static int __maybe_unused rt5645_sys_resume(struct device *dev) 4330 + static int rt5645_sys_resume(struct device *dev) 4331 4331 { 4332 4332 struct rt5645_priv *rt5645 = dev_get_drvdata(dev); 4333 4333 ··· 4342 4342 } 4343 4343 4344 4344 static const struct dev_pm_ops rt5645_pm = { 4345 - SET_SYSTEM_SLEEP_PM_OPS(rt5645_sys_suspend, rt5645_sys_resume) 4345 + SYSTEM_SLEEP_PM_OPS(rt5645_sys_suspend, rt5645_sys_resume) 4346 4346 }; 4347 4347 4348 4348 static struct i2c_driver rt5645_i2c_driver = { ··· 4350 4350 .name = "rt5645", 4351 4351 .of_match_table = of_match_ptr(rt5645_of_match), 4352 4352 .acpi_match_table = ACPI_PTR(rt5645_acpi_match), 4353 - .pm = &rt5645_pm, 4353 + .pm = pm_ptr(&rt5645_pm), 4354 4354 }, 4355 4355 .probe = rt5645_i2c_probe, 4356 4356 .remove = rt5645_i2c_remove,
+6 -6
sound/soc/codecs/rt5682-sdw.c
··· 709 709 }; 710 710 MODULE_DEVICE_TABLE(sdw, rt5682_id); 711 711 712 - static int __maybe_unused rt5682_dev_suspend(struct device *dev) 712 + static int rt5682_dev_suspend(struct device *dev) 713 713 { 714 714 struct rt5682_priv *rt5682 = dev_get_drvdata(dev); 715 715 ··· 725 725 return 0; 726 726 } 727 727 728 - static int __maybe_unused rt5682_dev_system_suspend(struct device *dev) 728 + static int rt5682_dev_system_suspend(struct device *dev) 729 729 { 730 730 struct rt5682_priv *rt5682 = dev_get_drvdata(dev); 731 731 struct sdw_slave *slave = dev_to_sdw_dev(dev); ··· 753 753 return rt5682_dev_suspend(dev); 754 754 } 755 755 756 - static int __maybe_unused rt5682_dev_resume(struct device *dev) 756 + static int rt5682_dev_resume(struct device *dev) 757 757 { 758 758 struct sdw_slave *slave = dev_to_sdw_dev(dev); 759 759 struct rt5682_priv *rt5682 = dev_get_drvdata(dev); ··· 791 791 } 792 792 793 793 static const struct dev_pm_ops rt5682_pm = { 794 - SET_SYSTEM_SLEEP_PM_OPS(rt5682_dev_system_suspend, rt5682_dev_resume) 795 - SET_RUNTIME_PM_OPS(rt5682_dev_suspend, rt5682_dev_resume, NULL) 794 + SYSTEM_SLEEP_PM_OPS(rt5682_dev_system_suspend, rt5682_dev_resume) 795 + RUNTIME_PM_OPS(rt5682_dev_suspend, rt5682_dev_resume, NULL) 796 796 }; 797 797 798 798 static struct sdw_driver rt5682_sdw_driver = { 799 799 .driver = { 800 800 .name = "rt5682", 801 - .pm = &rt5682_pm, 801 + .pm = pm_ptr(&rt5682_pm), 802 802 }, 803 803 .probe = rt5682_sdw_probe, 804 804 .remove = rt5682_sdw_remove,
+6 -6
sound/soc/codecs/rt700-sdw.c
··· 475 475 }; 476 476 MODULE_DEVICE_TABLE(sdw, rt700_id); 477 477 478 - static int __maybe_unused rt700_dev_suspend(struct device *dev) 478 + static int rt700_dev_suspend(struct device *dev) 479 479 { 480 480 struct rt700_priv *rt700 = dev_get_drvdata(dev); 481 481 ··· 490 490 return 0; 491 491 } 492 492 493 - static int __maybe_unused rt700_dev_system_suspend(struct device *dev) 493 + static int rt700_dev_system_suspend(struct device *dev) 494 494 { 495 495 struct sdw_slave *slave = dev_to_sdw_dev(dev); 496 496 struct rt700_priv *rt700 = dev_get_drvdata(dev); ··· 520 520 521 521 #define RT700_PROBE_TIMEOUT 5000 522 522 523 - static int __maybe_unused rt700_dev_resume(struct device *dev) 523 + static int rt700_dev_resume(struct device *dev) 524 524 { 525 525 struct sdw_slave *slave = dev_to_sdw_dev(dev); 526 526 struct rt700_priv *rt700 = dev_get_drvdata(dev); ··· 551 551 } 552 552 553 553 static const struct dev_pm_ops rt700_pm = { 554 - SET_SYSTEM_SLEEP_PM_OPS(rt700_dev_system_suspend, rt700_dev_resume) 555 - SET_RUNTIME_PM_OPS(rt700_dev_suspend, rt700_dev_resume, NULL) 554 + SYSTEM_SLEEP_PM_OPS(rt700_dev_system_suspend, rt700_dev_resume) 555 + RUNTIME_PM_OPS(rt700_dev_suspend, rt700_dev_resume, NULL) 556 556 }; 557 557 558 558 static struct sdw_driver rt700_sdw_driver = { 559 559 .driver = { 560 560 .name = "rt700", 561 - .pm = &rt700_pm, 561 + .pm = pm_ptr(&rt700_pm), 562 562 }, 563 563 .probe = rt700_sdw_probe, 564 564 .remove = rt700_sdw_remove,
+6 -6
sound/soc/codecs/rt711-sdca-sdw.c
··· 380 380 }; 381 381 MODULE_DEVICE_TABLE(sdw, rt711_sdca_id); 382 382 383 - static int __maybe_unused rt711_sdca_dev_suspend(struct device *dev) 383 + static int rt711_sdca_dev_suspend(struct device *dev) 384 384 { 385 385 struct rt711_sdca_priv *rt711 = dev_get_drvdata(dev); 386 386 ··· 396 396 return 0; 397 397 } 398 398 399 - static int __maybe_unused rt711_sdca_dev_system_suspend(struct device *dev) 399 + static int rt711_sdca_dev_system_suspend(struct device *dev) 400 400 { 401 401 struct rt711_sdca_priv *rt711_sdca = dev_get_drvdata(dev); 402 402 struct sdw_slave *slave = dev_to_sdw_dev(dev); ··· 428 428 429 429 #define RT711_PROBE_TIMEOUT 5000 430 430 431 - static int __maybe_unused rt711_sdca_dev_resume(struct device *dev) 431 + static int rt711_sdca_dev_resume(struct device *dev) 432 432 { 433 433 struct sdw_slave *slave = dev_to_sdw_dev(dev); 434 434 struct rt711_sdca_priv *rt711 = dev_get_drvdata(dev); ··· 467 467 } 468 468 469 469 static const struct dev_pm_ops rt711_sdca_pm = { 470 - SET_SYSTEM_SLEEP_PM_OPS(rt711_sdca_dev_system_suspend, rt711_sdca_dev_resume) 471 - SET_RUNTIME_PM_OPS(rt711_sdca_dev_suspend, rt711_sdca_dev_resume, NULL) 470 + SYSTEM_SLEEP_PM_OPS(rt711_sdca_dev_system_suspend, rt711_sdca_dev_resume) 471 + RUNTIME_PM_OPS(rt711_sdca_dev_suspend, rt711_sdca_dev_resume, NULL) 472 472 }; 473 473 474 474 static struct sdw_driver rt711_sdca_sdw_driver = { 475 475 .driver = { 476 476 .name = "rt711-sdca", 477 - .pm = &rt711_sdca_pm, 477 + .pm = pm_ptr(&rt711_sdca_pm), 478 478 }, 479 479 .probe = rt711_sdca_sdw_probe, 480 480 .remove = rt711_sdca_sdw_remove,
+6 -6
sound/soc/codecs/rt711-sdw.c
··· 482 482 }; 483 483 MODULE_DEVICE_TABLE(sdw, rt711_id); 484 484 485 - static int __maybe_unused rt711_dev_suspend(struct device *dev) 485 + static int rt711_dev_suspend(struct device *dev) 486 486 { 487 487 struct rt711_priv *rt711 = dev_get_drvdata(dev); 488 488 ··· 498 498 return 0; 499 499 } 500 500 501 - static int __maybe_unused rt711_dev_system_suspend(struct device *dev) 501 + static int rt711_dev_system_suspend(struct device *dev) 502 502 { 503 503 struct rt711_priv *rt711 = dev_get_drvdata(dev); 504 504 struct sdw_slave *slave = dev_to_sdw_dev(dev); ··· 528 528 529 529 #define RT711_PROBE_TIMEOUT 5000 530 530 531 - static int __maybe_unused rt711_dev_resume(struct device *dev) 531 + static int rt711_dev_resume(struct device *dev) 532 532 { 533 533 struct sdw_slave *slave = dev_to_sdw_dev(dev); 534 534 struct rt711_priv *rt711 = dev_get_drvdata(dev); ··· 564 564 } 565 565 566 566 static const struct dev_pm_ops rt711_pm = { 567 - SET_SYSTEM_SLEEP_PM_OPS(rt711_dev_system_suspend, rt711_dev_resume) 568 - SET_RUNTIME_PM_OPS(rt711_dev_suspend, rt711_dev_resume, NULL) 567 + SYSTEM_SLEEP_PM_OPS(rt711_dev_system_suspend, rt711_dev_resume) 568 + RUNTIME_PM_OPS(rt711_dev_suspend, rt711_dev_resume, NULL) 569 569 }; 570 570 571 571 static struct sdw_driver rt711_sdw_driver = { 572 572 .driver = { 573 573 .name = "rt711", 574 - .pm = &rt711_pm, 574 + .pm = pm_ptr(&rt711_pm), 575 575 }, 576 576 .probe = rt711_sdw_probe, 577 577 .remove = rt711_sdw_remove,
+6 -6
sound/soc/codecs/rt712-sdca-dmic.c
··· 884 884 }; 885 885 MODULE_DEVICE_TABLE(sdw, rt712_sdca_dmic_id); 886 886 887 - static int __maybe_unused rt712_sdca_dmic_dev_suspend(struct device *dev) 887 + static int rt712_sdca_dmic_dev_suspend(struct device *dev) 888 888 { 889 889 struct rt712_sdca_dmic_priv *rt712 = dev_get_drvdata(dev); 890 890 ··· 897 897 return 0; 898 898 } 899 899 900 - static int __maybe_unused rt712_sdca_dmic_dev_system_suspend(struct device *dev) 900 + static int rt712_sdca_dmic_dev_system_suspend(struct device *dev) 901 901 { 902 902 struct rt712_sdca_dmic_priv *rt712_sdca = dev_get_drvdata(dev); 903 903 ··· 909 909 910 910 #define RT712_PROBE_TIMEOUT 5000 911 911 912 - static int __maybe_unused rt712_sdca_dmic_dev_resume(struct device *dev) 912 + static int rt712_sdca_dmic_dev_resume(struct device *dev) 913 913 { 914 914 struct sdw_slave *slave = dev_to_sdw_dev(dev); 915 915 struct rt712_sdca_dmic_priv *rt712 = dev_get_drvdata(dev); ··· 941 941 } 942 942 943 943 static const struct dev_pm_ops rt712_sdca_dmic_pm = { 944 - SET_SYSTEM_SLEEP_PM_OPS(rt712_sdca_dmic_dev_system_suspend, rt712_sdca_dmic_dev_resume) 945 - SET_RUNTIME_PM_OPS(rt712_sdca_dmic_dev_suspend, rt712_sdca_dmic_dev_resume, NULL) 944 + SYSTEM_SLEEP_PM_OPS(rt712_sdca_dmic_dev_system_suspend, rt712_sdca_dmic_dev_resume) 945 + RUNTIME_PM_OPS(rt712_sdca_dmic_dev_suspend, rt712_sdca_dmic_dev_resume, NULL) 946 946 }; 947 947 948 948 ··· 978 978 static struct sdw_driver rt712_sdca_dmic_sdw_driver = { 979 979 .driver = { 980 980 .name = "rt712-sdca-dmic", 981 - .pm = &rt712_sdca_dmic_pm, 981 + .pm = pm_ptr(&rt712_sdca_dmic_pm), 982 982 }, 983 983 .probe = rt712_sdca_dmic_sdw_probe, 984 984 .remove = rt712_sdca_dmic_sdw_remove,
+6 -6
sound/soc/codecs/rt712-sdca-sdw.c
··· 400 400 }; 401 401 MODULE_DEVICE_TABLE(sdw, rt712_sdca_id); 402 402 403 - static int __maybe_unused rt712_sdca_dev_suspend(struct device *dev) 403 + static int rt712_sdca_dev_suspend(struct device *dev) 404 404 { 405 405 struct rt712_sdca_priv *rt712 = dev_get_drvdata(dev); 406 406 ··· 416 416 return 0; 417 417 } 418 418 419 - static int __maybe_unused rt712_sdca_dev_system_suspend(struct device *dev) 419 + static int rt712_sdca_dev_system_suspend(struct device *dev) 420 420 { 421 421 struct rt712_sdca_priv *rt712_sdca = dev_get_drvdata(dev); 422 422 struct sdw_slave *slave = dev_to_sdw_dev(dev); ··· 448 448 449 449 #define RT712_PROBE_TIMEOUT 5000 450 450 451 - static int __maybe_unused rt712_sdca_dev_resume(struct device *dev) 451 + static int rt712_sdca_dev_resume(struct device *dev) 452 452 { 453 453 struct sdw_slave *slave = dev_to_sdw_dev(dev); 454 454 struct rt712_sdca_priv *rt712 = dev_get_drvdata(dev); ··· 488 488 } 489 489 490 490 static const struct dev_pm_ops rt712_sdca_pm = { 491 - SET_SYSTEM_SLEEP_PM_OPS(rt712_sdca_dev_system_suspend, rt712_sdca_dev_resume) 492 - SET_RUNTIME_PM_OPS(rt712_sdca_dev_suspend, rt712_sdca_dev_resume, NULL) 491 + SYSTEM_SLEEP_PM_OPS(rt712_sdca_dev_system_suspend, rt712_sdca_dev_resume) 492 + RUNTIME_PM_OPS(rt712_sdca_dev_suspend, rt712_sdca_dev_resume, NULL) 493 493 }; 494 494 495 495 static struct sdw_driver rt712_sdca_sdw_driver = { 496 496 .driver = { 497 497 .name = "rt712-sdca", 498 - .pm = &rt712_sdca_pm, 498 + .pm = pm_ptr(&rt712_sdca_pm), 499 499 }, 500 500 .probe = rt712_sdca_sdw_probe, 501 501 .remove = rt712_sdca_sdw_remove,
+5 -5
sound/soc/codecs/rt715-sdca-sdw.c
··· 205 205 }; 206 206 MODULE_DEVICE_TABLE(sdw, rt715_sdca_id); 207 207 208 - static int __maybe_unused rt715_dev_suspend(struct device *dev) 208 + static int rt715_dev_suspend(struct device *dev) 209 209 { 210 210 struct rt715_sdca_priv *rt715 = dev_get_drvdata(dev); 211 211 ··· 222 222 223 223 #define RT715_PROBE_TIMEOUT 5000 224 224 225 - static int __maybe_unused rt715_dev_resume(struct device *dev) 225 + static int rt715_dev_resume(struct device *dev) 226 226 { 227 227 struct sdw_slave *slave = dev_to_sdw_dev(dev); 228 228 struct rt715_sdca_priv *rt715 = dev_get_drvdata(dev); ··· 263 263 } 264 264 265 265 static const struct dev_pm_ops rt715_pm = { 266 - SET_SYSTEM_SLEEP_PM_OPS(rt715_dev_suspend, rt715_dev_resume) 267 - SET_RUNTIME_PM_OPS(rt715_dev_suspend, rt715_dev_resume, NULL) 266 + SYSTEM_SLEEP_PM_OPS(rt715_dev_suspend, rt715_dev_resume) 267 + RUNTIME_PM_OPS(rt715_dev_suspend, rt715_dev_resume, NULL) 268 268 }; 269 269 270 270 static struct sdw_driver rt715_sdw_driver = { 271 271 .driver = { 272 272 .name = "rt715-sdca", 273 - .pm = &rt715_pm, 273 + .pm = pm_ptr(&rt715_pm), 274 274 }, 275 275 .probe = rt715_sdca_sdw_probe, 276 276 .remove = rt715_sdca_sdw_remove,
+5 -5
sound/soc/codecs/rt715-sdw.c
··· 485 485 }; 486 486 MODULE_DEVICE_TABLE(sdw, rt715_id); 487 487 488 - static int __maybe_unused rt715_dev_suspend(struct device *dev) 488 + static int rt715_dev_suspend(struct device *dev) 489 489 { 490 490 struct rt715_priv *rt715 = dev_get_drvdata(dev); 491 491 ··· 499 499 500 500 #define RT715_PROBE_TIMEOUT 5000 501 501 502 - static int __maybe_unused rt715_dev_resume(struct device *dev) 502 + static int rt715_dev_resume(struct device *dev) 503 503 { 504 504 struct sdw_slave *slave = dev_to_sdw_dev(dev); 505 505 struct rt715_priv *rt715 = dev_get_drvdata(dev); ··· 530 530 } 531 531 532 532 static const struct dev_pm_ops rt715_pm = { 533 - SET_SYSTEM_SLEEP_PM_OPS(rt715_dev_suspend, rt715_dev_resume) 534 - SET_RUNTIME_PM_OPS(rt715_dev_suspend, rt715_dev_resume, NULL) 533 + SYSTEM_SLEEP_PM_OPS(rt715_dev_suspend, rt715_dev_resume) 534 + RUNTIME_PM_OPS(rt715_dev_suspend, rt715_dev_resume, NULL) 535 535 }; 536 536 537 537 static struct sdw_driver rt715_sdw_driver = { 538 538 .driver = { 539 539 .name = "rt715", 540 - .pm = &rt715_pm, 540 + .pm = pm_ptr(&rt715_pm), 541 541 }, 542 542 .probe = rt715_sdw_probe, 543 543 .remove = rt715_sdw_remove,
+6 -6
sound/soc/codecs/rt721-sdca-sdw.c
··· 437 437 }; 438 438 MODULE_DEVICE_TABLE(sdw, rt721_sdca_id); 439 439 440 - static int __maybe_unused rt721_sdca_dev_suspend(struct device *dev) 440 + static int rt721_sdca_dev_suspend(struct device *dev) 441 441 { 442 442 struct rt721_sdca_priv *rt721 = dev_get_drvdata(dev); 443 443 ··· 453 453 return 0; 454 454 } 455 455 456 - static int __maybe_unused rt721_sdca_dev_system_suspend(struct device *dev) 456 + static int rt721_sdca_dev_system_suspend(struct device *dev) 457 457 { 458 458 struct rt721_sdca_priv *rt721_sdca = dev_get_drvdata(dev); 459 459 struct sdw_slave *slave = dev_to_sdw_dev(dev); ··· 485 485 486 486 #define RT721_PROBE_TIMEOUT 5000 487 487 488 - static int __maybe_unused rt721_sdca_dev_resume(struct device *dev) 488 + static int rt721_sdca_dev_resume(struct device *dev) 489 489 { 490 490 struct sdw_slave *slave = dev_to_sdw_dev(dev); 491 491 struct rt721_sdca_priv *rt721 = dev_get_drvdata(dev); ··· 524 524 } 525 525 526 526 static const struct dev_pm_ops rt721_sdca_pm = { 527 - SET_SYSTEM_SLEEP_PM_OPS(rt721_sdca_dev_system_suspend, rt721_sdca_dev_resume) 528 - SET_RUNTIME_PM_OPS(rt721_sdca_dev_suspend, rt721_sdca_dev_resume, NULL) 527 + SYSTEM_SLEEP_PM_OPS(rt721_sdca_dev_system_suspend, rt721_sdca_dev_resume) 528 + RUNTIME_PM_OPS(rt721_sdca_dev_suspend, rt721_sdca_dev_resume, NULL) 529 529 }; 530 530 531 531 static struct sdw_driver rt721_sdca_sdw_driver = { 532 532 .driver = { 533 533 .name = "rt721-sdca", 534 534 .owner = THIS_MODULE, 535 - .pm = &rt721_sdca_pm, 535 + .pm = pm_ptr(&rt721_sdca_pm), 536 536 }, 537 537 .probe = rt721_sdca_sdw_probe, 538 538 .remove = rt721_sdca_sdw_remove,
+6 -6
sound/soc/codecs/rt722-sdca-sdw.c
··· 430 430 }; 431 431 MODULE_DEVICE_TABLE(sdw, rt722_sdca_id); 432 432 433 - static int __maybe_unused rt722_sdca_dev_suspend(struct device *dev) 433 + static int rt722_sdca_dev_suspend(struct device *dev) 434 434 { 435 435 struct rt722_sdca_priv *rt722 = dev_get_drvdata(dev); 436 436 ··· 445 445 return 0; 446 446 } 447 447 448 - static int __maybe_unused rt722_sdca_dev_system_suspend(struct device *dev) 448 + static int rt722_sdca_dev_system_suspend(struct device *dev) 449 449 { 450 450 struct rt722_sdca_priv *rt722_sdca = dev_get_drvdata(dev); 451 451 struct sdw_slave *slave = dev_to_sdw_dev(dev); ··· 477 477 478 478 #define RT722_PROBE_TIMEOUT 5000 479 479 480 - static int __maybe_unused rt722_sdca_dev_resume(struct device *dev) 480 + static int rt722_sdca_dev_resume(struct device *dev) 481 481 { 482 482 struct sdw_slave *slave = dev_to_sdw_dev(dev); 483 483 struct rt722_sdca_priv *rt722 = dev_get_drvdata(dev); ··· 514 514 } 515 515 516 516 static const struct dev_pm_ops rt722_sdca_pm = { 517 - SET_SYSTEM_SLEEP_PM_OPS(rt722_sdca_dev_system_suspend, rt722_sdca_dev_resume) 518 - SET_RUNTIME_PM_OPS(rt722_sdca_dev_suspend, rt722_sdca_dev_resume, NULL) 517 + SYSTEM_SLEEP_PM_OPS(rt722_sdca_dev_system_suspend, rt722_sdca_dev_resume) 518 + RUNTIME_PM_OPS(rt722_sdca_dev_suspend, rt722_sdca_dev_resume, NULL) 519 519 }; 520 520 521 521 static struct sdw_driver rt722_sdca_sdw_driver = { 522 522 .driver = { 523 523 .name = "rt722-sdca", 524 - .pm = &rt722_sdca_pm, 524 + .pm = pm_ptr(&rt722_sdca_pm), 525 525 }, 526 526 .probe = rt722_sdca_sdw_probe, 527 527 .remove = rt722_sdca_sdw_remove,
+4 -4
sound/soc/codecs/rt9120.c
··· 590 590 pm_runtime_set_suspended(&i2c->dev); 591 591 } 592 592 593 - static int __maybe_unused rt9120_runtime_suspend(struct device *dev) 593 + static int rt9120_runtime_suspend(struct device *dev) 594 594 { 595 595 struct rt9120_data *data = dev_get_drvdata(dev); 596 596 ··· 603 603 return 0; 604 604 } 605 605 606 - static int __maybe_unused rt9120_runtime_resume(struct device *dev) 606 + static int rt9120_runtime_resume(struct device *dev) 607 607 { 608 608 struct rt9120_data *data = dev_get_drvdata(dev); 609 609 ··· 618 618 } 619 619 620 620 static const struct dev_pm_ops rt9120_pm_ops = { 621 - SET_RUNTIME_PM_OPS(rt9120_runtime_suspend, rt9120_runtime_resume, NULL) 621 + RUNTIME_PM_OPS(rt9120_runtime_suspend, rt9120_runtime_resume, NULL) 622 622 }; 623 623 624 624 static const struct of_device_id __maybe_unused rt9120_device_table[] = { ··· 631 631 .driver = { 632 632 .name = "rt9120", 633 633 .of_match_table = rt9120_device_table, 634 - .pm = &rt9120_pm_ops, 634 + .pm = pm_ptr(&rt9120_pm_ops), 635 635 }, 636 636 .probe = rt9120_probe, 637 637 .remove = rt9120_remove,
+4 -4
sound/soc/codecs/rtq9128.c
··· 729 729 return devm_snd_soc_register_component(dev, &rtq9128_comp_driver, &rtq9128_dai, 1); 730 730 } 731 731 732 - static int __maybe_unused rtq9128_pm_runtime_suspend(struct device *dev) 732 + static int rtq9128_pm_runtime_suspend(struct device *dev) 733 733 { 734 734 struct rtq9128_data *data = dev_get_drvdata(dev); 735 735 struct regmap *regmap = dev_get_regmap(dev, NULL); ··· 746 746 return 0; 747 747 } 748 748 749 - static int __maybe_unused rtq9128_pm_runtime_resume(struct device *dev) 749 + static int rtq9128_pm_runtime_resume(struct device *dev) 750 750 { 751 751 struct rtq9128_data *data = dev_get_drvdata(dev); 752 752 struct regmap *regmap = dev_get_regmap(dev, NULL); ··· 764 764 return regcache_sync(regmap); 765 765 } 766 766 767 - static const struct dev_pm_ops __maybe_unused rtq9128_pm_ops = { 768 - SET_RUNTIME_PM_OPS(rtq9128_pm_runtime_suspend, rtq9128_pm_runtime_resume, NULL) 767 + static const struct dev_pm_ops rtq9128_pm_ops = { 768 + RUNTIME_PM_OPS(rtq9128_pm_runtime_suspend, rtq9128_pm_runtime_resume, NULL) 769 769 }; 770 770 771 771 static const struct of_device_id rtq9128_device_table[] = {
+2 -7
sound/soc/codecs/tas2552.c
··· 138 138 {"ASI OUT", NULL, "DMIC"} 139 139 }; 140 140 141 - #ifdef CONFIG_PM 142 141 static void tas2552_sw_shutdown(struct tas2552_data *tas2552, int sw_shutdown) 143 142 { 144 143 u8 cfg1_reg = 0; ··· 151 152 snd_soc_component_update_bits(tas2552->component, TAS2552_CFG_1, TAS2552_SWS, 152 153 cfg1_reg); 153 154 } 154 - #endif 155 155 156 156 static int tas2552_setup_pll(struct snd_soc_component *component, 157 157 struct snd_pcm_hw_params *params) ··· 478 480 return 0; 479 481 } 480 482 481 - #ifdef CONFIG_PM 482 483 static int tas2552_runtime_suspend(struct device *dev) 483 484 { 484 485 struct tas2552_data *tas2552 = dev_get_drvdata(dev); ··· 505 508 506 509 return 0; 507 510 } 508 - #endif 509 511 510 512 static const struct dev_pm_ops tas2552_pm = { 511 - SET_RUNTIME_PM_OPS(tas2552_runtime_suspend, tas2552_runtime_resume, 512 - NULL) 513 + RUNTIME_PM_OPS(tas2552_runtime_suspend, tas2552_runtime_resume, NULL) 513 514 }; 514 515 515 516 static const struct snd_soc_dai_ops tas2552_speaker_dai_ops = { ··· 763 768 .driver = { 764 769 .name = "tas2552", 765 770 .of_match_table = of_match_ptr(tas2552_of_match), 766 - .pm = &tas2552_pm, 771 + .pm = pm_ptr(&tas2552_pm), 767 772 }, 768 773 .probe = tas2552_probe, 769 774 .remove = tas2552_i2c_remove,
+2 -4
sound/soc/codecs/ts3a227e.c
··· 399 399 return 0; 400 400 } 401 401 402 - #ifdef CONFIG_PM_SLEEP 403 402 static int ts3a227e_suspend(struct device *dev) 404 403 { 405 404 struct ts3a227e *ts3a227e = dev_get_drvdata(dev); ··· 418 419 419 420 return 0; 420 421 } 421 - #endif 422 422 423 423 static const struct dev_pm_ops ts3a227e_pm = { 424 - SET_SYSTEM_SLEEP_PM_OPS(ts3a227e_suspend, ts3a227e_resume) 424 + SYSTEM_SLEEP_PM_OPS(ts3a227e_suspend, ts3a227e_resume) 425 425 }; 426 426 427 427 static const struct i2c_device_id ts3a227e_i2c_ids[] = { ··· 448 450 static struct i2c_driver ts3a227e_driver = { 449 451 .driver = { 450 452 .name = "ts3a227e", 451 - .pm = &ts3a227e_pm, 453 + .pm = pm_ptr(&ts3a227e_pm), 452 454 .of_match_table = of_match_ptr(ts3a227e_of_match), 453 455 .acpi_match_table = ACPI_PTR(ts3a227e_acpi_match), 454 456 },
+4 -4
sound/soc/codecs/wcd937x-sdw.c
··· 1124 1124 }; 1125 1125 MODULE_DEVICE_TABLE(sdw, wcd9370_slave_id); 1126 1126 1127 - static int __maybe_unused wcd937x_sdw_runtime_suspend(struct device *dev) 1127 + static int wcd937x_sdw_runtime_suspend(struct device *dev) 1128 1128 { 1129 1129 struct wcd937x_sdw_priv *wcd = dev_get_drvdata(dev); 1130 1130 ··· 1136 1136 return 0; 1137 1137 } 1138 1138 1139 - static int __maybe_unused wcd937x_sdw_runtime_resume(struct device *dev) 1139 + static int wcd937x_sdw_runtime_resume(struct device *dev) 1140 1140 { 1141 1141 struct wcd937x_sdw_priv *wcd = dev_get_drvdata(dev); 1142 1142 ··· 1149 1149 } 1150 1150 1151 1151 static const struct dev_pm_ops wcd937x_sdw_pm_ops = { 1152 - SET_RUNTIME_PM_OPS(wcd937x_sdw_runtime_suspend, wcd937x_sdw_runtime_resume, NULL) 1152 + RUNTIME_PM_OPS(wcd937x_sdw_runtime_suspend, wcd937x_sdw_runtime_resume, NULL) 1153 1153 }; 1154 1154 1155 1155 static struct sdw_driver wcd9370_codec_driver = { ··· 1159 1159 .id_table = wcd9370_slave_id, 1160 1160 .driver = { 1161 1161 .name = "wcd9370-codec", 1162 - .pm = &wcd937x_sdw_pm_ops, 1162 + .pm = pm_ptr(&wcd937x_sdw_pm_ops), 1163 1163 } 1164 1164 }; 1165 1165 module_sdw_driver(wcd9370_codec_driver);
+4 -4
sound/soc/codecs/wcd938x-sdw.c
··· 1311 1311 }; 1312 1312 MODULE_DEVICE_TABLE(sdw, wcd9380_slave_id); 1313 1313 1314 - static int __maybe_unused wcd938x_sdw_runtime_suspend(struct device *dev) 1314 + static int wcd938x_sdw_runtime_suspend(struct device *dev) 1315 1315 { 1316 1316 struct wcd938x_sdw_priv *wcd = dev_get_drvdata(dev); 1317 1317 ··· 1323 1323 return 0; 1324 1324 } 1325 1325 1326 - static int __maybe_unused wcd938x_sdw_runtime_resume(struct device *dev) 1326 + static int wcd938x_sdw_runtime_resume(struct device *dev) 1327 1327 { 1328 1328 struct wcd938x_sdw_priv *wcd = dev_get_drvdata(dev); 1329 1329 ··· 1338 1338 } 1339 1339 1340 1340 static const struct dev_pm_ops wcd938x_sdw_pm_ops = { 1341 - SET_RUNTIME_PM_OPS(wcd938x_sdw_runtime_suspend, wcd938x_sdw_runtime_resume, NULL) 1341 + RUNTIME_PM_OPS(wcd938x_sdw_runtime_suspend, wcd938x_sdw_runtime_resume, NULL) 1342 1342 }; 1343 1343 1344 1344 ··· 1349 1349 .id_table = wcd9380_slave_id, 1350 1350 .driver = { 1351 1351 .name = "wcd9380-codec", 1352 - .pm = &wcd938x_sdw_pm_ops, 1352 + .pm = pm_ptr(&wcd938x_sdw_pm_ops), 1353 1353 } 1354 1354 }; 1355 1355 module_sdw_driver(wcd9380_codec_driver);
+4 -4
sound/soc/codecs/wcd939x-sdw.c
··· 1507 1507 }; 1508 1508 MODULE_DEVICE_TABLE(sdw, wcd9390_slave_id); 1509 1509 1510 - static int __maybe_unused wcd939x_sdw_runtime_suspend(struct device *dev) 1510 + static int wcd939x_sdw_runtime_suspend(struct device *dev) 1511 1511 { 1512 1512 struct wcd939x_sdw_priv *wcd = dev_get_drvdata(dev); 1513 1513 ··· 1519 1519 return 0; 1520 1520 } 1521 1521 1522 - static int __maybe_unused wcd939x_sdw_runtime_resume(struct device *dev) 1522 + static int wcd939x_sdw_runtime_resume(struct device *dev) 1523 1523 { 1524 1524 struct wcd939x_sdw_priv *wcd = dev_get_drvdata(dev); 1525 1525 ··· 1532 1532 } 1533 1533 1534 1534 static const struct dev_pm_ops wcd939x_sdw_pm_ops = { 1535 - SET_RUNTIME_PM_OPS(wcd939x_sdw_runtime_suspend, wcd939x_sdw_runtime_resume, NULL) 1535 + RUNTIME_PM_OPS(wcd939x_sdw_runtime_suspend, wcd939x_sdw_runtime_resume, NULL) 1536 1536 }; 1537 1537 1538 1538 static struct sdw_driver wcd9390_codec_driver = { ··· 1542 1542 .id_table = wcd9390_slave_id, 1543 1543 .driver = { 1544 1544 .name = "wcd9390-codec", 1545 - .pm = &wcd939x_sdw_pm_ops, 1545 + .pm = pm_ptr(&wcd939x_sdw_pm_ops), 1546 1546 } 1547 1547 }; 1548 1548 module_sdw_driver(wcd9390_codec_driver);
+2 -5
sound/soc/codecs/wm2200.c
··· 2429 2429 wm2200->core_supplies); 2430 2430 } 2431 2431 2432 - #ifdef CONFIG_PM 2433 2432 static int wm2200_runtime_suspend(struct device *dev) 2434 2433 { 2435 2434 struct wm2200_priv *wm2200 = dev_get_drvdata(dev); ··· 2465 2466 2466 2467 return 0; 2467 2468 } 2468 - #endif 2469 2469 2470 2470 static const struct dev_pm_ops wm2200_pm = { 2471 - SET_RUNTIME_PM_OPS(wm2200_runtime_suspend, wm2200_runtime_resume, 2472 - NULL) 2471 + RUNTIME_PM_OPS(wm2200_runtime_suspend, wm2200_runtime_resume, NULL) 2473 2472 }; 2474 2473 2475 2474 static const struct i2c_device_id wm2200_i2c_id[] = { ··· 2479 2482 static struct i2c_driver wm2200_i2c_driver = { 2480 2483 .driver = { 2481 2484 .name = "wm2200", 2482 - .pm = &wm2200_pm, 2485 + .pm = pm_ptr(&wm2200_pm), 2483 2486 }, 2484 2487 .probe = wm2200_i2c_probe, 2485 2488 .remove = wm2200_i2c_remove,
+2 -5
sound/soc/codecs/wm5100.c
··· 2625 2625 gpiod_set_value_cansleep(wm5100->ldo_ena, 0); 2626 2626 } 2627 2627 2628 - #ifdef CONFIG_PM 2629 2628 static int wm5100_runtime_suspend(struct device *dev) 2630 2629 { 2631 2630 struct wm5100_priv *wm5100 = dev_get_drvdata(dev); ··· 2661 2662 2662 2663 return 0; 2663 2664 } 2664 - #endif 2665 2665 2666 2666 static const struct dev_pm_ops wm5100_pm = { 2667 - SET_RUNTIME_PM_OPS(wm5100_runtime_suspend, wm5100_runtime_resume, 2668 - NULL) 2667 + RUNTIME_PM_OPS(wm5100_runtime_suspend, wm5100_runtime_resume, NULL) 2669 2668 }; 2670 2669 2671 2670 static const struct i2c_device_id wm5100_i2c_id[] = { ··· 2675 2678 static struct i2c_driver wm5100_i2c_driver = { 2676 2679 .driver = { 2677 2680 .name = "wm5100", 2678 - .pm = &wm5100_pm, 2681 + .pm = pm_ptr(&wm5100_pm), 2679 2682 }, 2680 2683 .probe = wm5100_i2c_probe, 2681 2684 .remove = wm5100_i2c_remove,
+1 -1
sound/soc/codecs/wm8804-i2c.c
··· 56 56 static struct i2c_driver wm8804_i2c_driver = { 57 57 .driver = { 58 58 .name = "wm8804", 59 - .pm = &wm8804_pm, 59 + .pm = pm_ptr(&wm8804_pm), 60 60 .of_match_table = of_match_ptr(wm8804_of_match), 61 61 .acpi_match_table = ACPI_PTR(wm8804_acpi_match), 62 62 },
+1 -1
sound/soc/codecs/wm8804-spi.c
··· 38 38 static struct spi_driver wm8804_spi_driver = { 39 39 .driver = { 40 40 .name = "wm8804", 41 - .pm = &wm8804_pm, 41 + .pm = pm_ptr(&wm8804_pm), 42 42 .of_match_table = wm8804_of_match, 43 43 }, 44 44 .probe = wm8804_spi_probe,
+2 -5
sound/soc/codecs/wm8804.c
··· 680 680 } 681 681 EXPORT_SYMBOL_GPL(wm8804_remove); 682 682 683 - #if IS_ENABLED(CONFIG_PM) 684 683 static int wm8804_runtime_resume(struct device *dev) 685 684 { 686 685 struct wm8804_priv *wm8804 = dev_get_drvdata(dev); ··· 712 713 713 714 return 0; 714 715 } 715 - #endif 716 716 717 - const struct dev_pm_ops wm8804_pm = { 718 - SET_RUNTIME_PM_OPS(wm8804_runtime_suspend, wm8804_runtime_resume, NULL) 717 + EXPORT_GPL_DEV_PM_OPS(wm8804_pm) = { 718 + RUNTIME_PM_OPS(wm8804_runtime_suspend, wm8804_runtime_resume, NULL) 719 719 }; 720 - EXPORT_SYMBOL_GPL(wm8804_pm); 721 720 722 721 MODULE_DESCRIPTION("ASoC WM8804 driver"); 723 722 MODULE_AUTHOR("Dimitris Papastamos <dp@opensource.wolfsonmicro.com>");
+3 -5
sound/soc/codecs/wm8962.c
··· 3850 3850 pm_runtime_disable(&client->dev); 3851 3851 } 3852 3852 3853 - #ifdef CONFIG_PM 3854 3853 static int wm8962_runtime_resume(struct device *dev) 3855 3854 { 3856 3855 struct wm8962_priv *wm8962 = dev_get_drvdata(dev); ··· 3929 3930 3930 3931 return 0; 3931 3932 } 3932 - #endif 3933 3933 3934 3934 static const struct dev_pm_ops wm8962_pm = { 3935 - SET_SYSTEM_SLEEP_PM_OPS(pm_runtime_force_suspend, pm_runtime_force_resume) 3936 - SET_RUNTIME_PM_OPS(wm8962_runtime_suspend, wm8962_runtime_resume, NULL) 3935 + SYSTEM_SLEEP_PM_OPS(pm_runtime_force_suspend, pm_runtime_force_resume) 3936 + RUNTIME_PM_OPS(wm8962_runtime_suspend, wm8962_runtime_resume, NULL) 3937 3937 }; 3938 3938 3939 3939 static const struct i2c_device_id wm8962_i2c_id[] = { ··· 3951 3953 .driver = { 3952 3954 .name = "wm8962", 3953 3955 .of_match_table = wm8962_of_match, 3954 - .pm = &wm8962_pm, 3956 + .pm = pm_ptr(&wm8962_pm), 3955 3957 }, 3956 3958 .probe = wm8962_i2c_probe, 3957 3959 .remove = wm8962_i2c_remove,
+2 -4
sound/soc/codecs/wm8994.c
··· 4662 4662 pm_runtime_disable(&pdev->dev); 4663 4663 } 4664 4664 4665 - #ifdef CONFIG_PM_SLEEP 4666 4665 static int wm8994_suspend(struct device *dev) 4667 4666 { 4668 4667 struct wm8994_priv *wm8994 = dev_get_drvdata(dev); ··· 4686 4687 4687 4688 return 0; 4688 4689 } 4689 - #endif 4690 4690 4691 4691 static const struct dev_pm_ops wm8994_pm_ops = { 4692 - SET_SYSTEM_SLEEP_PM_OPS(wm8994_suspend, wm8994_resume) 4692 + SYSTEM_SLEEP_PM_OPS(wm8994_suspend, wm8994_resume) 4693 4693 }; 4694 4694 4695 4695 static struct platform_driver wm8994_codec_driver = { 4696 4696 .driver = { 4697 4697 .name = "wm8994-codec", 4698 - .pm = &wm8994_pm_ops, 4698 + .pm = pm_ptr(&wm8994_pm_ops), 4699 4699 }, 4700 4700 .probe = wm8994_probe, 4701 4701 .remove = wm8994_remove,
+4 -4
sound/soc/codecs/wsa881x.c
··· 1169 1169 ARRAY_SIZE(wsa881x_dais)); 1170 1170 } 1171 1171 1172 - static int __maybe_unused wsa881x_runtime_suspend(struct device *dev) 1172 + static int wsa881x_runtime_suspend(struct device *dev) 1173 1173 { 1174 1174 struct regmap *regmap = dev_get_regmap(dev, NULL); 1175 1175 struct wsa881x_priv *wsa881x = dev_get_drvdata(dev); ··· 1182 1182 return 0; 1183 1183 } 1184 1184 1185 - static int __maybe_unused wsa881x_runtime_resume(struct device *dev) 1185 + static int wsa881x_runtime_resume(struct device *dev) 1186 1186 { 1187 1187 struct sdw_slave *slave = dev_to_sdw_dev(dev); 1188 1188 struct regmap *regmap = dev_get_regmap(dev, NULL); ··· 1206 1206 } 1207 1207 1208 1208 static const struct dev_pm_ops wsa881x_pm_ops = { 1209 - SET_RUNTIME_PM_OPS(wsa881x_runtime_suspend, wsa881x_runtime_resume, NULL) 1209 + RUNTIME_PM_OPS(wsa881x_runtime_suspend, wsa881x_runtime_resume, NULL) 1210 1210 }; 1211 1211 1212 1212 static const struct sdw_device_id wsa881x_slave_id[] = { ··· 1222 1222 .id_table = wsa881x_slave_id, 1223 1223 .driver = { 1224 1224 .name = "wsa881x-codec", 1225 - .pm = &wsa881x_pm_ops, 1225 + .pm = pm_ptr(&wsa881x_pm_ops), 1226 1226 } 1227 1227 }; 1228 1228 module_sdw_driver(wsa881x_codec_driver);
+4 -4
sound/soc/codecs/wsa883x.c
··· 1636 1636 1637 1637 } 1638 1638 1639 - static int __maybe_unused wsa883x_runtime_suspend(struct device *dev) 1639 + static int wsa883x_runtime_suspend(struct device *dev) 1640 1640 { 1641 1641 struct regmap *regmap = dev_get_regmap(dev, NULL); 1642 1642 ··· 1646 1646 return 0; 1647 1647 } 1648 1648 1649 - static int __maybe_unused wsa883x_runtime_resume(struct device *dev) 1649 + static int wsa883x_runtime_resume(struct device *dev) 1650 1650 { 1651 1651 struct regmap *regmap = dev_get_regmap(dev, NULL); 1652 1652 ··· 1657 1657 } 1658 1658 1659 1659 static const struct dev_pm_ops wsa883x_pm_ops = { 1660 - SET_RUNTIME_PM_OPS(wsa883x_runtime_suspend, wsa883x_runtime_resume, NULL) 1660 + RUNTIME_PM_OPS(wsa883x_runtime_suspend, wsa883x_runtime_resume, NULL) 1661 1661 }; 1662 1662 1663 1663 static const struct sdw_device_id wsa883x_swr_id[] = { ··· 1670 1670 static struct sdw_driver wsa883x_codec_driver = { 1671 1671 .driver = { 1672 1672 .name = "wsa883x-codec", 1673 - .pm = &wsa883x_pm_ops, 1673 + .pm = pm_ptr(&wsa883x_pm_ops), 1674 1674 .suppress_bind_attrs = true, 1675 1675 }, 1676 1676 .probe = wsa883x_probe,
+4 -4
sound/soc/codecs/wsa884x.c
··· 2136 2136 ARRAY_SIZE(wsa884x_dais)); 2137 2137 } 2138 2138 2139 - static int __maybe_unused wsa884x_runtime_suspend(struct device *dev) 2139 + static int wsa884x_runtime_suspend(struct device *dev) 2140 2140 { 2141 2141 struct regmap *regmap = dev_get_regmap(dev, NULL); 2142 2142 ··· 2146 2146 return 0; 2147 2147 } 2148 2148 2149 - static int __maybe_unused wsa884x_runtime_resume(struct device *dev) 2149 + static int wsa884x_runtime_resume(struct device *dev) 2150 2150 { 2151 2151 struct regmap *regmap = dev_get_regmap(dev, NULL); 2152 2152 ··· 2157 2157 } 2158 2158 2159 2159 static const struct dev_pm_ops wsa884x_pm_ops = { 2160 - SET_RUNTIME_PM_OPS(wsa884x_runtime_suspend, wsa884x_runtime_resume, NULL) 2160 + RUNTIME_PM_OPS(wsa884x_runtime_suspend, wsa884x_runtime_resume, NULL) 2161 2161 }; 2162 2162 2163 2163 static const struct sdw_device_id wsa884x_swr_id[] = { ··· 2169 2169 static struct sdw_driver wsa884x_codec_driver = { 2170 2170 .driver = { 2171 2171 .name = "wsa884x-codec", 2172 - .pm = &wsa884x_pm_ops, 2172 + .pm = pm_ptr(&wsa884x_pm_ops), 2173 2173 }, 2174 2174 .probe = wsa884x_probe, 2175 2175 .ops = &wsa884x_slave_ops,
+3 -3
sound/soc/dwc/dwc-i2s.c
··· 478 478 .set_tdm_slot = dw_i2s_set_tdm_slot, 479 479 }; 480 480 481 - #ifdef CONFIG_PM 482 481 static int dw_i2s_runtime_suspend(struct device *dev) 483 482 { 484 483 struct dw_i2s_dev *dw_dev = dev_get_drvdata(dev); ··· 500 501 return 0; 501 502 } 502 503 504 + #ifdef CONFIG_PM 503 505 static int dw_i2s_suspend(struct snd_soc_component *component) 504 506 { 505 507 struct dw_i2s_dev *dev = snd_soc_component_get_drvdata(component); ··· 1084 1084 #endif 1085 1085 1086 1086 static const struct dev_pm_ops dwc_pm_ops = { 1087 - SET_RUNTIME_PM_OPS(dw_i2s_runtime_suspend, dw_i2s_runtime_resume, NULL) 1087 + RUNTIME_PM_OPS(dw_i2s_runtime_suspend, dw_i2s_runtime_resume, NULL) 1088 1088 }; 1089 1089 1090 1090 static struct platform_driver dw_i2s_driver = { ··· 1093 1093 .driver = { 1094 1094 .name = "designware-i2s", 1095 1095 .of_match_table = of_match_ptr(dw_i2s_of_match), 1096 - .pm = &dwc_pm_ops, 1096 + .pm = pm_ptr(&dwc_pm_ops), 1097 1097 }, 1098 1098 }; 1099 1099
+1 -2
sound/soc/fsl/fsl_aud2htx.c
··· 290 290 static const struct dev_pm_ops fsl_aud2htx_pm_ops = { 291 291 RUNTIME_PM_OPS(fsl_aud2htx_runtime_suspend, fsl_aud2htx_runtime_resume, 292 292 NULL) 293 - SET_SYSTEM_SLEEP_PM_OPS(pm_runtime_force_suspend, 294 - pm_runtime_force_resume) 293 + SYSTEM_SLEEP_PM_OPS(pm_runtime_force_suspend, pm_runtime_force_resume) 295 294 }; 296 295 297 296 static struct platform_driver fsl_aud2htx_driver = {
+3 -6
sound/soc/fsl/fsl_esai.c
··· 1189 1189 } 1190 1190 1191 1191 static const struct dev_pm_ops fsl_esai_pm_ops = { 1192 - SET_RUNTIME_PM_OPS(fsl_esai_runtime_suspend, 1193 - fsl_esai_runtime_resume, 1194 - NULL) 1195 - SET_SYSTEM_SLEEP_PM_OPS(pm_runtime_force_suspend, 1196 - pm_runtime_force_resume) 1192 + RUNTIME_PM_OPS(fsl_esai_runtime_suspend, fsl_esai_runtime_resume, NULL) 1193 + SYSTEM_SLEEP_PM_OPS(pm_runtime_force_suspend, pm_runtime_force_resume) 1197 1194 }; 1198 1195 1199 1196 static struct platform_driver fsl_esai_driver = { ··· 1198 1201 .remove = fsl_esai_remove, 1199 1202 .driver = { 1200 1203 .name = "fsl-esai-dai", 1201 - .pm = &fsl_esai_pm_ops, 1204 + .pm = pm_ptr(&fsl_esai_pm_ops), 1202 1205 .of_match_table = fsl_esai_dt_ids, 1203 1206 }, 1204 1207 };
+3 -6
sound/soc/fsl/fsl_micfil.c
··· 1512 1512 } 1513 1513 1514 1514 static const struct dev_pm_ops fsl_micfil_pm_ops = { 1515 - SET_RUNTIME_PM_OPS(fsl_micfil_runtime_suspend, 1516 - fsl_micfil_runtime_resume, 1517 - NULL) 1518 - SET_SYSTEM_SLEEP_PM_OPS(pm_runtime_force_suspend, 1519 - pm_runtime_force_resume) 1515 + RUNTIME_PM_OPS(fsl_micfil_runtime_suspend, fsl_micfil_runtime_resume, NULL) 1516 + SYSTEM_SLEEP_PM_OPS(pm_runtime_force_suspend, pm_runtime_force_resume) 1520 1517 }; 1521 1518 1522 1519 static struct platform_driver fsl_micfil_driver = { ··· 1521 1524 .remove = fsl_micfil_remove, 1522 1525 .driver = { 1523 1526 .name = "fsl-micfil-dai", 1524 - .pm = &fsl_micfil_pm_ops, 1527 + .pm = pm_ptr(&fsl_micfil_pm_ops), 1525 1528 .of_match_table = fsl_micfil_dt_ids, 1526 1529 }, 1527 1530 };
+3 -5
sound/soc/fsl/fsl_sai.c
··· 1817 1817 } 1818 1818 1819 1819 static const struct dev_pm_ops fsl_sai_pm_ops = { 1820 - SET_RUNTIME_PM_OPS(fsl_sai_runtime_suspend, 1821 - fsl_sai_runtime_resume, NULL) 1822 - SET_SYSTEM_SLEEP_PM_OPS(pm_runtime_force_suspend, 1823 - pm_runtime_force_resume) 1820 + RUNTIME_PM_OPS(fsl_sai_runtime_suspend, fsl_sai_runtime_resume, NULL) 1821 + SYSTEM_SLEEP_PM_OPS(pm_runtime_force_suspend, pm_runtime_force_resume) 1824 1822 }; 1825 1823 1826 1824 static struct platform_driver fsl_sai_driver = { ··· 1826 1828 .remove = fsl_sai_remove, 1827 1829 .driver = { 1828 1830 .name = "fsl-sai", 1829 - .pm = &fsl_sai_pm_ops, 1831 + .pm = pm_ptr(&fsl_sai_pm_ops), 1830 1832 .of_match_table = fsl_sai_ids, 1831 1833 }, 1832 1834 };
+1 -2
sound/soc/fsl/fsl_xcvr.c
··· 1821 1821 1822 1822 static const struct dev_pm_ops fsl_xcvr_pm_ops = { 1823 1823 RUNTIME_PM_OPS(fsl_xcvr_runtime_suspend, fsl_xcvr_runtime_resume, NULL) 1824 - SET_SYSTEM_SLEEP_PM_OPS(pm_runtime_force_suspend, 1825 - pm_runtime_force_resume) 1824 + SYSTEM_SLEEP_PM_OPS(pm_runtime_force_suspend, pm_runtime_force_resume) 1826 1825 }; 1827 1826 1828 1827 static struct platform_driver fsl_xcvr_driver = {
+3 -6
sound/soc/img/img-i2s-in.c
··· 539 539 img_i2s_in_runtime_suspend(&pdev->dev); 540 540 } 541 541 542 - #ifdef CONFIG_PM_SLEEP 543 542 static int img_i2s_in_suspend(struct device *dev) 544 543 { 545 544 struct img_i2s_in *i2s = dev_get_drvdata(dev); ··· 585 586 586 587 return 0; 587 588 } 588 - #endif 589 589 590 590 static const struct of_device_id img_i2s_in_of_match[] = { 591 591 { .compatible = "img,i2s-in" }, ··· 593 595 MODULE_DEVICE_TABLE(of, img_i2s_in_of_match); 594 596 595 597 static const struct dev_pm_ops img_i2s_in_pm_ops = { 596 - SET_RUNTIME_PM_OPS(img_i2s_in_runtime_suspend, 597 - img_i2s_in_runtime_resume, NULL) 598 - SET_SYSTEM_SLEEP_PM_OPS(img_i2s_in_suspend, img_i2s_in_resume) 598 + RUNTIME_PM_OPS(img_i2s_in_runtime_suspend, img_i2s_in_runtime_resume, NULL) 599 + SYSTEM_SLEEP_PM_OPS(img_i2s_in_suspend, img_i2s_in_resume) 599 600 }; 600 601 601 602 static struct platform_driver img_i2s_in_driver = { 602 603 .driver = { 603 604 .name = "img-i2s-in", 604 605 .of_match_table = img_i2s_in_of_match, 605 - .pm = &img_i2s_in_pm_ops 606 + .pm = pm_ptr(&img_i2s_in_pm_ops) 606 607 }, 607 608 .probe = img_i2s_in_probe, 608 609 .remove = img_i2s_in_dev_remove
+3 -6
sound/soc/img/img-i2s-out.c
··· 539 539 img_i2s_out_runtime_suspend(&pdev->dev); 540 540 } 541 541 542 - #ifdef CONFIG_PM_SLEEP 543 542 static int img_i2s_out_suspend(struct device *dev) 544 543 { 545 544 struct img_i2s_out *i2s = dev_get_drvdata(dev); ··· 585 586 586 587 return 0; 587 588 } 588 - #endif 589 589 590 590 static const struct of_device_id img_i2s_out_of_match[] = { 591 591 { .compatible = "img,i2s-out" }, ··· 593 595 MODULE_DEVICE_TABLE(of, img_i2s_out_of_match); 594 596 595 597 static const struct dev_pm_ops img_i2s_out_pm_ops = { 596 - SET_RUNTIME_PM_OPS(img_i2s_out_runtime_suspend, 597 - img_i2s_out_runtime_resume, NULL) 598 - SET_SYSTEM_SLEEP_PM_OPS(img_i2s_out_suspend, img_i2s_out_resume) 598 + RUNTIME_PM_OPS(img_i2s_out_runtime_suspend, img_i2s_out_runtime_resume, NULL) 599 + SYSTEM_SLEEP_PM_OPS(img_i2s_out_suspend, img_i2s_out_resume) 599 600 }; 600 601 601 602 static struct platform_driver img_i2s_out_driver = { 602 603 .driver = { 603 604 .name = "img-i2s-out", 604 605 .of_match_table = img_i2s_out_of_match, 605 - .pm = &img_i2s_out_pm_ops 606 + .pm = pm_ptr(&img_i2s_out_pm_ops) 606 607 }, 607 608 .probe = img_i2s_out_probe, 608 609 .remove = img_i2s_out_dev_remove
+2 -3
sound/soc/img/img-parallel-out.c
··· 300 300 MODULE_DEVICE_TABLE(of, img_prl_out_of_match); 301 301 302 302 static const struct dev_pm_ops img_prl_out_pm_ops = { 303 - SET_RUNTIME_PM_OPS(img_prl_out_suspend, 304 - img_prl_out_resume, NULL) 303 + RUNTIME_PM_OPS(img_prl_out_suspend, img_prl_out_resume, NULL) 305 304 }; 306 305 307 306 static struct platform_driver img_prl_out_driver = { 308 307 .driver = { 309 308 .name = "img-parallel-out", 310 309 .of_match_table = img_prl_out_of_match, 311 - .pm = &img_prl_out_pm_ops 310 + .pm = pm_ptr(&img_prl_out_pm_ops) 312 311 }, 313 312 .probe = img_prl_out_probe, 314 313 .remove = img_prl_out_dev_remove
+3 -6
sound/soc/img/img-spdif-in.c
··· 817 817 img_spdif_in_runtime_suspend(&pdev->dev); 818 818 } 819 819 820 - #ifdef CONFIG_PM_SLEEP 821 820 static int img_spdif_in_suspend(struct device *dev) 822 821 { 823 822 struct img_spdif_in *spdif = dev_get_drvdata(dev); ··· 856 857 857 858 return 0; 858 859 } 859 - #endif 860 860 861 861 static const struct of_device_id img_spdif_in_of_match[] = { 862 862 { .compatible = "img,spdif-in" }, ··· 864 866 MODULE_DEVICE_TABLE(of, img_spdif_in_of_match); 865 867 866 868 static const struct dev_pm_ops img_spdif_in_pm_ops = { 867 - SET_RUNTIME_PM_OPS(img_spdif_in_runtime_suspend, 868 - img_spdif_in_runtime_resume, NULL) 869 - SET_SYSTEM_SLEEP_PM_OPS(img_spdif_in_suspend, img_spdif_in_resume) 869 + RUNTIME_PM_OPS(img_spdif_in_runtime_suspend, img_spdif_in_runtime_resume, NULL) 870 + SYSTEM_SLEEP_PM_OPS(img_spdif_in_suspend, img_spdif_in_resume) 870 871 }; 871 872 872 873 static struct platform_driver img_spdif_in_driver = { 873 874 .driver = { 874 875 .name = "img-spdif-in", 875 876 .of_match_table = img_spdif_in_of_match, 876 - .pm = &img_spdif_in_pm_ops 877 + .pm = pm_ptr(&img_spdif_in_pm_ops) 877 878 }, 878 879 .probe = img_spdif_in_probe, 879 880 .remove = img_spdif_in_dev_remove
+4 -6
sound/soc/img/img-spdif-out.c
··· 409 409 img_spdif_out_runtime_suspend(&pdev->dev); 410 410 } 411 411 412 - #ifdef CONFIG_PM_SLEEP 413 412 static int img_spdif_out_suspend(struct device *dev) 414 413 { 415 414 struct img_spdif_out *spdif = dev_get_drvdata(dev); ··· 447 448 448 449 return 0; 449 450 } 450 - #endif 451 + 451 452 static const struct of_device_id img_spdif_out_of_match[] = { 452 453 { .compatible = "img,spdif-out" }, 453 454 {} ··· 455 456 MODULE_DEVICE_TABLE(of, img_spdif_out_of_match); 456 457 457 458 static const struct dev_pm_ops img_spdif_out_pm_ops = { 458 - SET_RUNTIME_PM_OPS(img_spdif_out_runtime_suspend, 459 - img_spdif_out_runtime_resume, NULL) 460 - SET_SYSTEM_SLEEP_PM_OPS(img_spdif_out_suspend, img_spdif_out_resume) 459 + RUNTIME_PM_OPS(img_spdif_out_runtime_suspend, img_spdif_out_runtime_resume, NULL) 460 + SYSTEM_SLEEP_PM_OPS(img_spdif_out_suspend, img_spdif_out_resume) 461 461 }; 462 462 463 463 static struct platform_driver img_spdif_out_driver = { 464 464 .driver = { 465 465 .name = "img-spdif-out", 466 466 .of_match_table = img_spdif_out_of_match, 467 - .pm = &img_spdif_out_pm_ops 467 + .pm = pm_ptr(&img_spdif_out_pm_ops) 468 468 }, 469 469 .probe = img_spdif_out_probe, 470 470 .remove = img_spdif_out_dev_remove
+3 -5
sound/soc/img/pistachio-internal-dac.c
··· 224 224 regulator_disable(dac->supply); 225 225 } 226 226 227 - #ifdef CONFIG_PM 228 227 static int pistachio_internal_dac_rt_resume(struct device *dev) 229 228 { 230 229 struct pistachio_internal_dac *dac = dev_get_drvdata(dev); ··· 250 251 251 252 return 0; 252 253 } 253 - #endif 254 254 255 255 static const struct dev_pm_ops pistachio_internal_dac_pm_ops = { 256 - SET_RUNTIME_PM_OPS(pistachio_internal_dac_rt_suspend, 257 - pistachio_internal_dac_rt_resume, NULL) 256 + RUNTIME_PM_OPS(pistachio_internal_dac_rt_suspend, 257 + pistachio_internal_dac_rt_resume, NULL) 258 258 }; 259 259 260 260 static const struct of_device_id pistachio_internal_dac_of_match[] = { ··· 266 268 .driver = { 267 269 .name = "img-pistachio-internal-dac", 268 270 .of_match_table = pistachio_internal_dac_of_match, 269 - .pm = &pistachio_internal_dac_pm_ops 271 + .pm = pm_ptr(&pistachio_internal_dac_pm_ops) 270 272 }, 271 273 .probe = pistachio_internal_dac_probe, 272 274 .remove = pistachio_internal_dac_remove
+12 -12
sound/soc/intel/avs/core.c
··· 612 612 return 0; 613 613 } 614 614 615 - static int __maybe_unused avs_suspend_common(struct avs_dev *adev, bool low_power) 615 + static int avs_suspend_common(struct avs_dev *adev, bool low_power) 616 616 { 617 617 struct hdac_bus *bus = &adev->base.core; 618 618 int ret; ··· 673 673 return 0; 674 674 } 675 675 676 - static int __maybe_unused avs_resume_common(struct avs_dev *adev, bool low_power, bool purge) 676 + static int avs_resume_common(struct avs_dev *adev, bool low_power, bool purge) 677 677 { 678 678 struct hdac_bus *bus = &adev->base.core; 679 679 int ret; ··· 696 696 return 0; 697 697 } 698 698 699 - static int __maybe_unused avs_suspend(struct device *dev) 699 + static int avs_suspend(struct device *dev) 700 700 { 701 701 return avs_suspend_common(to_avs_dev(dev), true); 702 702 } 703 703 704 - static int __maybe_unused avs_resume(struct device *dev) 704 + static int avs_resume(struct device *dev) 705 705 { 706 706 return avs_resume_common(to_avs_dev(dev), true, true); 707 707 } 708 708 709 - static int __maybe_unused avs_runtime_suspend(struct device *dev) 709 + static int avs_runtime_suspend(struct device *dev) 710 710 { 711 711 return avs_suspend_common(to_avs_dev(dev), true); 712 712 } 713 713 714 - static int __maybe_unused avs_runtime_resume(struct device *dev) 714 + static int avs_runtime_resume(struct device *dev) 715 715 { 716 716 return avs_resume_common(to_avs_dev(dev), true, false); 717 717 } 718 718 719 - static int __maybe_unused avs_freeze(struct device *dev) 719 + static int avs_freeze(struct device *dev) 720 720 { 721 721 return avs_suspend_common(to_avs_dev(dev), false); 722 722 } 723 - static int __maybe_unused avs_thaw(struct device *dev) 723 + static int avs_thaw(struct device *dev) 724 724 { 725 725 return avs_resume_common(to_avs_dev(dev), false, true); 726 726 } 727 727 728 - static int __maybe_unused avs_poweroff(struct device *dev) 728 + static int avs_poweroff(struct device *dev) 729 729 { 730 730 return avs_suspend_common(to_avs_dev(dev), false); 731 731 } 732 732 733 - static int __maybe_unused avs_restore(struct device *dev) 733 + static int avs_restore(struct device *dev) 734 734 { 735 735 return avs_resume_common(to_avs_dev(dev), false, true); 736 736 } ··· 742 742 .thaw = avs_thaw, 743 743 .poweroff = avs_poweroff, 744 744 .restore = avs_restore, 745 - SET_RUNTIME_PM_OPS(avs_runtime_suspend, avs_runtime_resume, NULL) 745 + RUNTIME_PM_OPS(avs_runtime_suspend, avs_runtime_resume, NULL) 746 746 }; 747 747 748 748 static const struct avs_sram_spec skl_sram_spec = { ··· 893 893 .shutdown = avs_pci_shutdown, 894 894 .dev_groups = avs_attr_groups, 895 895 .driver = { 896 - .pm = &avs_dev_pm, 896 + .pm = pm_ptr(&avs_dev_pm), 897 897 }, 898 898 }; 899 899 module_pci_driver(avs_pci_driver);
+7 -7
sound/soc/intel/catpt/device.c
··· 28 28 #define CREATE_TRACE_POINTS 29 29 #include "trace.h" 30 30 31 - static int __maybe_unused catpt_suspend(struct device *dev) 31 + static int catpt_suspend(struct device *dev) 32 32 { 33 33 struct catpt_dev *cdev = dev_get_drvdata(dev); 34 34 struct dma_chan *chan; ··· 72 72 return catpt_dsp_power_down(cdev); 73 73 } 74 74 75 - static int __maybe_unused catpt_resume(struct device *dev) 75 + static int catpt_resume(struct device *dev) 76 76 { 77 77 struct catpt_dev *cdev = dev_get_drvdata(dev); 78 78 int ret, i; ··· 106 106 return 0; 107 107 } 108 108 109 - static int __maybe_unused catpt_runtime_suspend(struct device *dev) 109 + static int catpt_runtime_suspend(struct device *dev) 110 110 { 111 111 if (!try_module_get(dev->driver->owner)) { 112 112 dev_info(dev, "module unloading, skipping suspend\n"); ··· 117 117 return catpt_suspend(dev); 118 118 } 119 119 120 - static int __maybe_unused catpt_runtime_resume(struct device *dev) 120 + static int catpt_runtime_resume(struct device *dev) 121 121 { 122 122 return catpt_resume(dev); 123 123 } 124 124 125 125 static const struct dev_pm_ops catpt_dev_pm = { 126 - SET_SYSTEM_SLEEP_PM_OPS(catpt_suspend, catpt_resume) 127 - SET_RUNTIME_PM_OPS(catpt_runtime_suspend, catpt_runtime_resume, NULL) 126 + SYSTEM_SLEEP_PM_OPS(catpt_suspend, catpt_resume) 127 + RUNTIME_PM_OPS(catpt_runtime_suspend, catpt_runtime_resume, NULL) 128 128 }; 129 129 130 130 /* machine board owned by CATPT is removed with this hook */ ··· 378 378 .driver = { 379 379 .name = "intel_catpt", 380 380 .acpi_match_table = catpt_ids, 381 - .pm = &catpt_dev_pm, 381 + .pm = pm_ptr(&catpt_dev_pm), 382 382 .dev_groups = catpt_attr_groups, 383 383 }, 384 384 };
+3 -3
sound/soc/mediatek/mt2701/mt2701-afe-pcm.c
··· 1462 1462 MODULE_DEVICE_TABLE(of, mt2701_afe_pcm_dt_match); 1463 1463 1464 1464 static const struct dev_pm_ops mt2701_afe_pm_ops = { 1465 - SET_RUNTIME_PM_OPS(mt2701_afe_runtime_suspend, 1466 - mt2701_afe_runtime_resume, NULL) 1465 + RUNTIME_PM_OPS(mt2701_afe_runtime_suspend, 1466 + mt2701_afe_runtime_resume, NULL) 1467 1467 }; 1468 1468 1469 1469 static struct platform_driver mt2701_afe_pcm_driver = { 1470 1470 .driver = { 1471 1471 .name = "mt2701-audio", 1472 1472 .of_match_table = mt2701_afe_pcm_dt_match, 1473 - .pm = &mt2701_afe_pm_ops, 1473 + .pm = pm_ptr(&mt2701_afe_pm_ops), 1474 1474 }, 1475 1475 .probe = mt2701_afe_pcm_dev_probe, 1476 1476 .remove = mt2701_afe_pcm_dev_remove,
+3 -3
sound/soc/mediatek/mt6797/mt6797-afe-pcm.c
··· 879 879 MODULE_DEVICE_TABLE(of, mt6797_afe_pcm_dt_match); 880 880 881 881 static const struct dev_pm_ops mt6797_afe_pm_ops = { 882 - SET_RUNTIME_PM_OPS(mt6797_afe_runtime_suspend, 883 - mt6797_afe_runtime_resume, NULL) 882 + RUNTIME_PM_OPS(mt6797_afe_runtime_suspend, 883 + mt6797_afe_runtime_resume, NULL) 884 884 }; 885 885 886 886 static struct platform_driver mt6797_afe_pcm_driver = { 887 887 .driver = { 888 888 .name = "mt6797-audio", 889 889 .of_match_table = mt6797_afe_pcm_dt_match, 890 - .pm = &mt6797_afe_pm_ops, 890 + .pm = pm_ptr(&mt6797_afe_pm_ops), 891 891 }, 892 892 .probe = mt6797_afe_pcm_dev_probe, 893 893 .remove = mt6797_afe_pcm_dev_remove,
+3 -3
sound/soc/mediatek/mt7986/mt7986-afe-pcm.c
··· 589 589 MODULE_DEVICE_TABLE(of, mt7986_afe_pcm_dt_match); 590 590 591 591 static const struct dev_pm_ops mt7986_afe_pm_ops = { 592 - SET_RUNTIME_PM_OPS(mt7986_afe_runtime_suspend, 593 - mt7986_afe_runtime_resume, NULL) 592 + RUNTIME_PM_OPS(mt7986_afe_runtime_suspend, 593 + mt7986_afe_runtime_resume, NULL) 594 594 }; 595 595 596 596 static struct platform_driver mt7986_afe_pcm_driver = { 597 597 .driver = { 598 598 .name = "mt7986-audio", 599 599 .of_match_table = mt7986_afe_pcm_dt_match, 600 - .pm = &mt7986_afe_pm_ops, 600 + .pm = pm_ptr(&mt7986_afe_pm_ops), 601 601 }, 602 602 .probe = mt7986_afe_pcm_dev_probe, 603 603 .remove = mt7986_afe_pcm_dev_remove,
+3 -3
sound/soc/mediatek/mt8173/mt8173-afe-pcm.c
··· 1212 1212 MODULE_DEVICE_TABLE(of, mt8173_afe_pcm_dt_match); 1213 1213 1214 1214 static const struct dev_pm_ops mt8173_afe_pm_ops = { 1215 - SET_RUNTIME_PM_OPS(mt8173_afe_runtime_suspend, 1216 - mt8173_afe_runtime_resume, NULL) 1215 + RUNTIME_PM_OPS(mt8173_afe_runtime_suspend, 1216 + mt8173_afe_runtime_resume, NULL) 1217 1217 }; 1218 1218 1219 1219 static struct platform_driver mt8173_afe_pcm_driver = { 1220 1220 .driver = { 1221 1221 .name = "mt8173-afe-pcm", 1222 1222 .of_match_table = mt8173_afe_pcm_dt_match, 1223 - .pm = &mt8173_afe_pm_ops, 1223 + .pm = pm_ptr(&mt8173_afe_pm_ops), 1224 1224 }, 1225 1225 .probe = mt8173_afe_pcm_dev_probe, 1226 1226 .remove = mt8173_afe_pcm_dev_remove,
+3 -3
sound/soc/mediatek/mt8183/mt8183-afe-pcm.c
··· 1257 1257 MODULE_DEVICE_TABLE(of, mt8183_afe_pcm_dt_match); 1258 1258 1259 1259 static const struct dev_pm_ops mt8183_afe_pm_ops = { 1260 - SET_RUNTIME_PM_OPS(mt8183_afe_runtime_suspend, 1261 - mt8183_afe_runtime_resume, NULL) 1260 + RUNTIME_PM_OPS(mt8183_afe_runtime_suspend, 1261 + mt8183_afe_runtime_resume, NULL) 1262 1262 }; 1263 1263 1264 1264 static struct platform_driver mt8183_afe_pcm_driver = { 1265 1265 .driver = { 1266 1266 .name = "mt8183-audio", 1267 1267 .of_match_table = mt8183_afe_pcm_dt_match, 1268 - .pm = &mt8183_afe_pm_ops, 1268 + .pm = pm_ptr(&mt8183_afe_pm_ops), 1269 1269 }, 1270 1270 .probe = mt8183_afe_pcm_dev_probe, 1271 1271 .remove = mt8183_afe_pcm_dev_remove,
+3 -3
sound/soc/mediatek/mt8186/mt8186-afe-pcm.c
··· 2978 2978 MODULE_DEVICE_TABLE(of, mt8186_afe_pcm_dt_match); 2979 2979 2980 2980 static const struct dev_pm_ops mt8186_afe_pm_ops = { 2981 - SET_RUNTIME_PM_OPS(mt8186_afe_runtime_suspend, 2982 - mt8186_afe_runtime_resume, NULL) 2981 + RUNTIME_PM_OPS(mt8186_afe_runtime_suspend, 2982 + mt8186_afe_runtime_resume, NULL) 2983 2983 }; 2984 2984 2985 2985 static struct platform_driver mt8186_afe_pcm_driver = { 2986 2986 .driver = { 2987 2987 .name = "mt8186-audio", 2988 2988 .of_match_table = mt8186_afe_pcm_dt_match, 2989 - .pm = &mt8186_afe_pm_ops, 2989 + .pm = pm_ptr(&mt8186_afe_pm_ops), 2990 2990 }, 2991 2991 .probe = mt8186_afe_pcm_dev_probe, 2992 2992 };
+3 -3
sound/soc/mediatek/mt8188/mt8188-afe-pcm.c
··· 3381 3381 MODULE_DEVICE_TABLE(of, mt8188_afe_pcm_dt_match); 3382 3382 3383 3383 static const struct dev_pm_ops mt8188_afe_pm_ops = { 3384 - SET_RUNTIME_PM_OPS(mt8188_afe_runtime_suspend, 3385 - mt8188_afe_runtime_resume, NULL) 3384 + RUNTIME_PM_OPS(mt8188_afe_runtime_suspend, 3385 + mt8188_afe_runtime_resume, NULL) 3386 3386 }; 3387 3387 3388 3388 static struct platform_driver mt8188_afe_pcm_driver = { 3389 3389 .driver = { 3390 3390 .name = "mt8188-audio", 3391 3391 .of_match_table = mt8188_afe_pcm_dt_match, 3392 - .pm = &mt8188_afe_pm_ops, 3392 + .pm = pm_ptr(&mt8188_afe_pm_ops), 3393 3393 }, 3394 3394 .probe = mt8188_afe_pcm_dev_probe, 3395 3395 };
+3 -3
sound/soc/mediatek/mt8192/mt8192-afe-pcm.c
··· 2313 2313 MODULE_DEVICE_TABLE(of, mt8192_afe_pcm_dt_match); 2314 2314 2315 2315 static const struct dev_pm_ops mt8192_afe_pm_ops = { 2316 - SET_RUNTIME_PM_OPS(mt8192_afe_runtime_suspend, 2317 - mt8192_afe_runtime_resume, NULL) 2316 + RUNTIME_PM_OPS(mt8192_afe_runtime_suspend, 2317 + mt8192_afe_runtime_resume, NULL) 2318 2318 }; 2319 2319 2320 2320 static struct platform_driver mt8192_afe_pcm_driver = { 2321 2321 .driver = { 2322 2322 .name = "mt8192-audio", 2323 2323 .of_match_table = mt8192_afe_pcm_dt_match, 2324 - .pm = &mt8192_afe_pm_ops, 2324 + .pm = pm_ptr(&mt8192_afe_pm_ops), 2325 2325 }, 2326 2326 .probe = mt8192_afe_pcm_dev_probe, 2327 2327 .remove = mt8192_afe_pcm_dev_remove,
+3 -3
sound/soc/mediatek/mt8195/mt8195-afe-pcm.c
··· 3188 3188 MODULE_DEVICE_TABLE(of, mt8195_afe_pcm_dt_match); 3189 3189 3190 3190 static const struct dev_pm_ops mt8195_afe_pm_ops = { 3191 - SET_RUNTIME_PM_OPS(mt8195_afe_runtime_suspend, 3192 - mt8195_afe_runtime_resume, NULL) 3191 + RUNTIME_PM_OPS(mt8195_afe_runtime_suspend, 3192 + mt8195_afe_runtime_resume, NULL) 3193 3193 }; 3194 3194 3195 3195 static struct platform_driver mt8195_afe_pcm_driver = { 3196 3196 .driver = { 3197 3197 .name = "mt8195-audio", 3198 3198 .of_match_table = mt8195_afe_pcm_dt_match, 3199 - .pm = &mt8195_afe_pm_ops, 3199 + .pm = pm_ptr(&mt8195_afe_pm_ops), 3200 3200 }, 3201 3201 .probe = mt8195_afe_pcm_dev_probe, 3202 3202 .remove = mt8195_afe_pcm_dev_remove,
+9 -10
sound/soc/mediatek/mt8365/mt8365-afe-pcm.c
··· 1957 1957 return IRQ_HANDLED; 1958 1958 } 1959 1959 1960 - static int __maybe_unused mt8365_afe_runtime_suspend(struct device *dev) 1960 + static int mt8365_afe_runtime_suspend(struct device *dev) 1961 1961 { 1962 1962 return 0; 1963 1963 } ··· 1967 1967 return 0; 1968 1968 } 1969 1969 1970 - static int __maybe_unused mt8365_afe_suspend(struct device *dev) 1970 + static int mt8365_afe_suspend(struct device *dev) 1971 1971 { 1972 1972 struct mtk_base_afe *afe = dev_get_drvdata(dev); 1973 1973 struct regmap *regmap = afe->regmap; ··· 1989 1989 return 0; 1990 1990 } 1991 1991 1992 - static int __maybe_unused mt8365_afe_resume(struct device *dev) 1992 + static int mt8365_afe_resume(struct device *dev) 1993 1993 { 1994 1994 struct mtk_base_afe *afe = dev_get_drvdata(dev); 1995 1995 struct regmap *regmap = afe->regmap; ··· 2009 2009 return 0; 2010 2010 } 2011 2011 2012 - static int __maybe_unused mt8365_afe_dev_runtime_suspend(struct device *dev) 2012 + static int mt8365_afe_dev_runtime_suspend(struct device *dev) 2013 2013 { 2014 2014 struct mtk_base_afe *afe = dev_get_drvdata(dev); 2015 2015 ··· 2021 2021 return 0; 2022 2022 } 2023 2023 2024 - static int __maybe_unused mt8365_afe_dev_runtime_resume(struct device *dev) 2024 + static int mt8365_afe_dev_runtime_resume(struct device *dev) 2025 2025 { 2026 2026 struct mtk_base_afe *afe = dev_get_drvdata(dev); 2027 2027 ··· 2250 2250 MODULE_DEVICE_TABLE(of, mt8365_afe_pcm_dt_match); 2251 2251 2252 2252 static const struct dev_pm_ops mt8365_afe_pm_ops = { 2253 - SET_RUNTIME_PM_OPS(mt8365_afe_dev_runtime_suspend, 2254 - mt8365_afe_dev_runtime_resume, NULL) 2255 - SET_SYSTEM_SLEEP_PM_OPS(mt8365_afe_suspend, 2256 - mt8365_afe_resume) 2253 + RUNTIME_PM_OPS(mt8365_afe_dev_runtime_suspend, 2254 + mt8365_afe_dev_runtime_resume, NULL) 2255 + SYSTEM_SLEEP_PM_OPS(mt8365_afe_suspend, mt8365_afe_resume) 2257 2256 }; 2258 2257 2259 2258 static struct platform_driver mt8365_afe_pcm_driver = { 2260 2259 .driver = { 2261 2260 .name = "mt8365-afe-pcm", 2262 2261 .of_match_table = mt8365_afe_pcm_dt_match, 2263 - .pm = &mt8365_afe_pm_ops, 2262 + .pm = pm_ptr(&mt8365_afe_pm_ops), 2264 2263 }, 2265 2264 .probe = mt8365_afe_pcm_dev_probe, 2266 2265 .remove = mt8365_afe_pcm_dev_remove,
+4 -4
sound/soc/qcom/lpass-sc7180.c
··· 160 160 return 0; 161 161 } 162 162 163 - static int __maybe_unused sc7180_lpass_dev_resume(struct device *dev) 163 + static int sc7180_lpass_dev_resume(struct device *dev) 164 164 { 165 165 struct lpass_data *drvdata = dev_get_drvdata(dev); 166 166 167 167 return clk_bulk_prepare_enable(drvdata->num_clks, drvdata->clks); 168 168 } 169 169 170 - static int __maybe_unused sc7180_lpass_dev_suspend(struct device *dev) 170 + static int sc7180_lpass_dev_suspend(struct device *dev) 171 171 { 172 172 struct lpass_data *drvdata = dev_get_drvdata(dev); 173 173 ··· 176 176 } 177 177 178 178 static const struct dev_pm_ops sc7180_lpass_pm_ops = { 179 - SET_SYSTEM_SLEEP_PM_OPS(sc7180_lpass_dev_suspend, sc7180_lpass_dev_resume) 179 + SYSTEM_SLEEP_PM_OPS(sc7180_lpass_dev_suspend, sc7180_lpass_dev_resume) 180 180 }; 181 181 182 182 static const struct lpass_variant sc7180_data = { ··· 312 312 .driver = { 313 313 .name = "sc7180-lpass-cpu", 314 314 .of_match_table = of_match_ptr(sc7180_lpass_cpu_device_id), 315 - .pm = &sc7180_lpass_pm_ops, 315 + .pm = pm_ptr(&sc7180_lpass_pm_ops), 316 316 }, 317 317 .probe = asoc_qcom_lpass_cpu_platform_probe, 318 318 .remove = asoc_qcom_lpass_cpu_platform_remove,
+4 -4
sound/soc/qcom/lpass-sc7280.c
··· 233 233 return 0; 234 234 } 235 235 236 - static int __maybe_unused sc7280_lpass_dev_resume(struct device *dev) 236 + static int sc7280_lpass_dev_resume(struct device *dev) 237 237 { 238 238 struct lpass_data *drvdata = dev_get_drvdata(dev); 239 239 240 240 return clk_bulk_prepare_enable(drvdata->num_clks, drvdata->clks); 241 241 } 242 242 243 - static int __maybe_unused sc7280_lpass_dev_suspend(struct device *dev) 243 + static int sc7280_lpass_dev_suspend(struct device *dev) 244 244 { 245 245 struct lpass_data *drvdata = dev_get_drvdata(dev); 246 246 ··· 249 249 } 250 250 251 251 static const struct dev_pm_ops sc7280_lpass_pm_ops = { 252 - SET_SYSTEM_SLEEP_PM_OPS(sc7280_lpass_dev_suspend, sc7280_lpass_dev_resume) 252 + SYSTEM_SLEEP_PM_OPS(sc7280_lpass_dev_suspend, sc7280_lpass_dev_resume) 253 253 }; 254 254 255 255 static const struct lpass_variant sc7280_data = { ··· 442 442 .driver = { 443 443 .name = "sc7280-lpass-cpu", 444 444 .of_match_table = of_match_ptr(sc7280_lpass_cpu_device_id), 445 - .pm = &sc7280_lpass_pm_ops, 445 + .pm = pm_ptr(&sc7280_lpass_pm_ops), 446 446 }, 447 447 .probe = asoc_qcom_lpass_cpu_platform_probe, 448 448 .remove = asoc_qcom_lpass_cpu_platform_remove,
+4 -4
sound/soc/renesas/rcar/core.c
··· 2059 2059 remove_func[i](priv); 2060 2060 } 2061 2061 2062 - static int __maybe_unused rsnd_suspend(struct device *dev) 2062 + static int rsnd_suspend(struct device *dev) 2063 2063 { 2064 2064 struct rsnd_priv *priv = dev_get_drvdata(dev); 2065 2065 ··· 2068 2068 return 0; 2069 2069 } 2070 2070 2071 - static int __maybe_unused rsnd_resume(struct device *dev) 2071 + static int rsnd_resume(struct device *dev) 2072 2072 { 2073 2073 struct rsnd_priv *priv = dev_get_drvdata(dev); 2074 2074 ··· 2076 2076 } 2077 2077 2078 2078 static const struct dev_pm_ops rsnd_pm_ops = { 2079 - SET_SYSTEM_SLEEP_PM_OPS(rsnd_suspend, rsnd_resume) 2079 + SYSTEM_SLEEP_PM_OPS(rsnd_suspend, rsnd_resume) 2080 2080 }; 2081 2081 2082 2082 static struct platform_driver rsnd_driver = { 2083 2083 .driver = { 2084 2084 .name = "rcar_sound", 2085 - .pm = &rsnd_pm_ops, 2085 + .pm = pm_ptr(&rsnd_pm_ops), 2086 2086 .of_match_table = rsnd_of_match, 2087 2087 }, 2088 2088 .probe = rsnd_probe,
+2 -3
sound/soc/rockchip/rockchip_i2s.c
··· 860 860 } 861 861 862 862 static const struct dev_pm_ops rockchip_i2s_pm_ops = { 863 - SET_RUNTIME_PM_OPS(i2s_runtime_suspend, i2s_runtime_resume, 864 - NULL) 863 + RUNTIME_PM_OPS(i2s_runtime_suspend, i2s_runtime_resume, NULL) 865 864 }; 866 865 867 866 static struct platform_driver rockchip_i2s_driver = { ··· 869 870 .driver = { 870 871 .name = DRV_NAME, 871 872 .of_match_table = of_match_ptr(rockchip_i2s_match), 872 - .pm = &rockchip_i2s_pm_ops, 873 + .pm = pm_ptr(&rockchip_i2s_pm_ops), 873 874 }, 874 875 }; 875 876 module_platform_driver(rockchip_i2s_driver);
+7 -9
sound/soc/rockchip/rockchip_i2s_tdm.c
··· 122 122 return ret; 123 123 } 124 124 125 - static int __maybe_unused i2s_tdm_runtime_suspend(struct device *dev) 125 + static int i2s_tdm_runtime_suspend(struct device *dev) 126 126 { 127 127 struct rk_i2s_tdm_dev *i2s_tdm = dev_get_drvdata(dev); 128 128 ··· 134 134 return 0; 135 135 } 136 136 137 - static int __maybe_unused i2s_tdm_runtime_resume(struct device *dev) 137 + static int i2s_tdm_runtime_resume(struct device *dev) 138 138 { 139 139 struct rk_i2s_tdm_dev *i2s_tdm = dev_get_drvdata(dev); 140 140 int ret; ··· 1390 1390 pm_runtime_disable(&pdev->dev); 1391 1391 } 1392 1392 1393 - static int __maybe_unused rockchip_i2s_tdm_suspend(struct device *dev) 1393 + static int rockchip_i2s_tdm_suspend(struct device *dev) 1394 1394 { 1395 1395 struct rk_i2s_tdm_dev *i2s_tdm = dev_get_drvdata(dev); 1396 1396 ··· 1399 1399 return 0; 1400 1400 } 1401 1401 1402 - static int __maybe_unused rockchip_i2s_tdm_resume(struct device *dev) 1402 + static int rockchip_i2s_tdm_resume(struct device *dev) 1403 1403 { 1404 1404 struct rk_i2s_tdm_dev *i2s_tdm = dev_get_drvdata(dev); 1405 1405 int ret; ··· 1414 1414 } 1415 1415 1416 1416 static const struct dev_pm_ops rockchip_i2s_tdm_pm_ops = { 1417 - SET_RUNTIME_PM_OPS(i2s_tdm_runtime_suspend, i2s_tdm_runtime_resume, 1418 - NULL) 1419 - SET_SYSTEM_SLEEP_PM_OPS(rockchip_i2s_tdm_suspend, 1420 - rockchip_i2s_tdm_resume) 1417 + RUNTIME_PM_OPS(i2s_tdm_runtime_suspend, i2s_tdm_runtime_resume, NULL) 1418 + SYSTEM_SLEEP_PM_OPS(rockchip_i2s_tdm_suspend, rockchip_i2s_tdm_resume) 1421 1419 }; 1422 1420 1423 1421 static struct platform_driver rockchip_i2s_tdm_driver = { ··· 1424 1426 .driver = { 1425 1427 .name = DRV_NAME, 1426 1428 .of_match_table = rockchip_i2s_tdm_match, 1427 - .pm = &rockchip_i2s_tdm_pm_ops, 1429 + .pm = pm_ptr(&rockchip_i2s_tdm_pm_ops), 1428 1430 }, 1429 1431 }; 1430 1432 module_platform_driver(rockchip_i2s_tdm_driver);
+4 -6
sound/soc/rockchip/rockchip_pdm.c
··· 668 668 clk_disable_unprepare(pdm->hclk); 669 669 } 670 670 671 - #ifdef CONFIG_PM_SLEEP 672 671 static int rockchip_pdm_suspend(struct device *dev) 673 672 { 674 673 struct rk_pdm_dev *pdm = dev_get_drvdata(dev); ··· 692 693 693 694 return ret; 694 695 } 695 - #endif 696 696 697 697 static const struct dev_pm_ops rockchip_pdm_pm_ops = { 698 - SET_RUNTIME_PM_OPS(rockchip_pdm_runtime_suspend, 699 - rockchip_pdm_runtime_resume, NULL) 700 - SET_SYSTEM_SLEEP_PM_OPS(rockchip_pdm_suspend, rockchip_pdm_resume) 698 + RUNTIME_PM_OPS(rockchip_pdm_runtime_suspend, 699 + rockchip_pdm_runtime_resume, NULL) 700 + SYSTEM_SLEEP_PM_OPS(rockchip_pdm_suspend, rockchip_pdm_resume) 701 701 }; 702 702 703 703 static struct platform_driver rockchip_pdm_driver = { ··· 705 707 .driver = { 706 708 .name = "rockchip-pdm", 707 709 .of_match_table = of_match_ptr(rockchip_pdm_match), 708 - .pm = &rockchip_pdm_pm_ops, 710 + .pm = pm_ptr(&rockchip_pdm_pm_ops), 709 711 }, 710 712 }; 711 713
+4 -5
sound/soc/rockchip/rockchip_spdif.c
··· 63 63 }; 64 64 MODULE_DEVICE_TABLE(of, rk_spdif_match); 65 65 66 - static int __maybe_unused rk_spdif_runtime_suspend(struct device *dev) 66 + static int rk_spdif_runtime_suspend(struct device *dev) 67 67 { 68 68 struct rk_spdif_dev *spdif = dev_get_drvdata(dev); 69 69 ··· 74 74 return 0; 75 75 } 76 76 77 - static int __maybe_unused rk_spdif_runtime_resume(struct device *dev) 77 + static int rk_spdif_runtime_resume(struct device *dev) 78 78 { 79 79 struct rk_spdif_dev *spdif = dev_get_drvdata(dev); 80 80 int ret; ··· 374 374 } 375 375 376 376 static const struct dev_pm_ops rk_spdif_pm_ops = { 377 - SET_RUNTIME_PM_OPS(rk_spdif_runtime_suspend, rk_spdif_runtime_resume, 378 - NULL) 377 + RUNTIME_PM_OPS(rk_spdif_runtime_suspend, rk_spdif_runtime_resume, NULL) 379 378 }; 380 379 381 380 static struct platform_driver rk_spdif_driver = { ··· 383 384 .driver = { 384 385 .name = "rockchip-spdif", 385 386 .of_match_table = of_match_ptr(rk_spdif_match), 386 - .pm = &rk_spdif_pm_ops, 387 + .pm = pm_ptr(&rk_spdif_pm_ops), 387 388 }, 388 389 }; 389 390 module_platform_driver(rk_spdif_driver);
+3 -7
sound/soc/samsung/i2s.c
··· 1216 1216 return 0; 1217 1217 } 1218 1218 1219 - #ifdef CONFIG_PM 1220 1219 static int i2s_runtime_suspend(struct device *dev) 1221 1220 { 1222 1221 struct samsung_i2s_priv *priv = dev_get_drvdata(dev); ··· 1253 1254 1254 1255 return 0; 1255 1256 } 1256 - #endif /* CONFIG_PM */ 1257 1257 1258 1258 static void i2s_unregister_clocks(struct samsung_i2s_priv *priv) 1259 1259 { ··· 1731 1733 #endif 1732 1734 1733 1735 static const struct dev_pm_ops samsung_i2s_pm = { 1734 - SET_RUNTIME_PM_OPS(i2s_runtime_suspend, 1735 - i2s_runtime_resume, NULL) 1736 - SET_SYSTEM_SLEEP_PM_OPS(pm_runtime_force_suspend, 1737 - pm_runtime_force_resume) 1736 + RUNTIME_PM_OPS(i2s_runtime_suspend, i2s_runtime_resume, NULL) 1737 + SYSTEM_SLEEP_PM_OPS(pm_runtime_force_suspend, pm_runtime_force_resume) 1738 1738 }; 1739 1739 1740 1740 static struct platform_driver samsung_i2s_driver = { ··· 1742 1746 .driver = { 1743 1747 .name = "samsung-i2s", 1744 1748 .of_match_table = of_match_ptr(exynos_i2s_match), 1745 - .pm = &samsung_i2s_pm, 1749 + .pm = pm_ptr(&samsung_i2s_pm), 1746 1750 }, 1747 1751 }; 1748 1752
+1 -1
sound/soc/sof/amd/pci-acp63.c
··· 104 104 .probe = acp63_pci_probe, 105 105 .remove = acp63_pci_remove, 106 106 .driver = { 107 - .pm = &sof_pci_pm, 107 + .pm = pm_ptr(&sof_pci_pm), 108 108 }, 109 109 }; 110 110 module_pci_driver(snd_sof_pci_amd_acp63_driver);
+1 -1
sound/soc/sof/amd/pci-acp70.c
··· 100 100 .probe = acp70_pci_probe, 101 101 .remove = acp70_pci_remove, 102 102 .driver = { 103 - .pm = &sof_pci_pm, 103 + .pm = pm_ptr(&sof_pci_pm), 104 104 }, 105 105 }; 106 106 module_pci_driver(snd_sof_pci_amd_acp70_driver);
+1 -1
sound/soc/sof/amd/pci-rn.c
··· 97 97 .probe = acp_pci_rn_probe, 98 98 .remove = acp_pci_rn_remove, 99 99 .driver = { 100 - .pm = &sof_pci_pm, 100 + .pm = pm_ptr(&sof_pci_pm), 101 101 }, 102 102 }; 103 103 module_pci_driver(snd_sof_pci_amd_rn_driver);
+1 -1
sound/soc/sof/amd/pci-vangogh.c
··· 90 90 .probe = acp_pci_vgh_probe, 91 91 .remove = acp_pci_vgh_remove, 92 92 .driver = { 93 - .pm = &sof_pci_pm, 93 + .pm = pm_ptr(&sof_pci_pm), 94 94 }, 95 95 }; 96 96 module_pci_driver(snd_sof_pci_amd_vgh_driver);
+1 -1
sound/soc/sof/imx/imx8.c
··· 456 456 .remove = sof_of_remove, 457 457 .driver = { 458 458 .name = "sof-audio-of-imx8", 459 - .pm = &sof_of_pm, 459 + .pm = pm_ptr(&sof_of_pm), 460 460 .of_match_table = sof_of_imx8_ids, 461 461 }, 462 462 };
+1 -1
sound/soc/sof/imx/imx9.c
··· 126 126 .remove = sof_of_remove, 127 127 .driver = { 128 128 .name = "sof-audio-of-imx9", 129 - .pm = &sof_of_pm, 129 + .pm = pm_ptr(&sof_of_pm), 130 130 .of_match_table = sof_of_imx9_ids, 131 131 }, 132 132 };
+1 -1
sound/soc/sof/intel/bdw.c
··· 686 686 .remove = sof_acpi_remove, 687 687 .driver = { 688 688 .name = "sof-audio-acpi-intel-bdw", 689 - .pm = &sof_acpi_pm, 689 + .pm = pm_ptr(&sof_acpi_pm), 690 690 .acpi_match_table = sof_broadwell_match, 691 691 }, 692 692 };
+1 -1
sound/soc/sof/intel/byt.c
··· 467 467 .remove = sof_acpi_remove, 468 468 .driver = { 469 469 .name = "sof-audio-acpi-intel-byt", 470 - .pm = &sof_acpi_pm, 470 + .pm = pm_ptr(&sof_acpi_pm), 471 471 .acpi_match_table = sof_baytrail_match, 472 472 }, 473 473 };
+1 -1
sound/soc/sof/intel/pci-apl.c
··· 99 99 .remove = sof_pci_remove, 100 100 .shutdown = sof_pci_shutdown, 101 101 .driver = { 102 - .pm = &sof_pci_pm, 102 + .pm = pm_ptr(&sof_pci_pm), 103 103 }, 104 104 }; 105 105 module_pci_driver(snd_sof_pci_intel_apl_driver);
+1 -1
sound/soc/sof/intel/pci-cnl.c
··· 137 137 .remove = sof_pci_remove, 138 138 .shutdown = sof_pci_shutdown, 139 139 .driver = { 140 - .pm = &sof_pci_pm, 140 + .pm = pm_ptr(&sof_pci_pm), 141 141 }, 142 142 }; 143 143 module_pci_driver(snd_sof_pci_intel_cnl_driver);
+1 -1
sound/soc/sof/intel/pci-icl.c
··· 102 102 .remove = sof_pci_remove, 103 103 .shutdown = sof_pci_shutdown, 104 104 .driver = { 105 - .pm = &sof_pci_pm, 105 + .pm = pm_ptr(&sof_pci_pm), 106 106 }, 107 107 }; 108 108 module_pci_driver(snd_sof_pci_intel_icl_driver);
+1 -1
sound/soc/sof/intel/pci-lnl.c
··· 72 72 .remove = sof_pci_remove, 73 73 .shutdown = sof_pci_shutdown, 74 74 .driver = { 75 - .pm = &sof_pci_pm, 75 + .pm = pm_ptr(&sof_pci_pm), 76 76 }, 77 77 }; 78 78 module_pci_driver(snd_sof_pci_intel_lnl_driver);
+1 -1
sound/soc/sof/intel/pci-mtl.c
··· 135 135 .remove = sof_pci_remove, 136 136 .shutdown = sof_pci_shutdown, 137 137 .driver = { 138 - .pm = &sof_pci_pm, 138 + .pm = pm_ptr(&sof_pci_pm), 139 139 }, 140 140 }; 141 141 module_pci_driver(snd_sof_pci_intel_mtl_driver);
+1 -1
sound/soc/sof/intel/pci-ptl.c
··· 71 71 .remove = sof_pci_remove, 72 72 .shutdown = sof_pci_shutdown, 73 73 .driver = { 74 - .pm = &sof_pci_pm, 74 + .pm = pm_ptr(&sof_pci_pm), 75 75 }, 76 76 }; 77 77 module_pci_driver(snd_sof_pci_intel_ptl_driver);
+1 -1
sound/soc/sof/intel/pci-skl.c
··· 83 83 .remove = sof_pci_remove, 84 84 .shutdown = sof_pci_shutdown, 85 85 .driver = { 86 - .pm = &sof_pci_pm, 86 + .pm = pm_ptr(&sof_pci_pm), 87 87 }, 88 88 }; 89 89 module_pci_driver(snd_sof_pci_intel_skl_driver);
+1 -1
sound/soc/sof/intel/pci-tgl.c
··· 311 311 .remove = sof_pci_remove, 312 312 .shutdown = sof_pci_shutdown, 313 313 .driver = { 314 - .pm = &sof_pci_pm, 314 + .pm = pm_ptr(&sof_pci_pm), 315 315 }, 316 316 }; 317 317 module_pci_driver(snd_sof_pci_intel_tgl_driver);
+1 -1
sound/soc/sof/intel/pci-tng.c
··· 238 238 .remove = sof_pci_remove, 239 239 .shutdown = sof_pci_shutdown, 240 240 .driver = { 241 - .pm = &sof_pci_pm, 241 + .pm = pm_ptr(&sof_pci_pm), 242 242 }, 243 243 }; 244 244 module_pci_driver(snd_sof_pci_intel_tng_driver);
+1 -1
sound/soc/sof/mediatek/mt8186/mt8186.c
··· 660 660 .shutdown = sof_of_shutdown, 661 661 .driver = { 662 662 .name = "sof-audio-of-mt8186", 663 - .pm = &sof_of_pm, 663 + .pm = pm_ptr(&sof_of_pm), 664 664 .of_match_table = sof_of_mt8186_ids, 665 665 }, 666 666 };
+1 -1
sound/soc/sof/mediatek/mt8195/mt8195.c
··· 616 616 .shutdown = sof_of_shutdown, 617 617 .driver = { 618 618 .name = "sof-audio-of-mt8195", 619 - .pm = &sof_of_pm, 619 + .pm = pm_ptr(&sof_of_pm), 620 620 .of_match_table = sof_of_mt8195_ids, 621 621 }, 622 622 };
+4 -5
sound/soc/sof/sof-acpi-dev.c
··· 36 36 37 37 #define SOF_ACPI_DISABLE_PM_RUNTIME BIT(0) 38 38 39 - const struct dev_pm_ops sof_acpi_pm = { 40 - SET_SYSTEM_SLEEP_PM_OPS(snd_sof_suspend, snd_sof_resume) 41 - SET_RUNTIME_PM_OPS(snd_sof_runtime_suspend, snd_sof_runtime_resume, 42 - snd_sof_runtime_idle) 39 + EXPORT_NS_DEV_PM_OPS(sof_acpi_pm, SND_SOC_SOF_ACPI_DEV) = { 40 + SYSTEM_SLEEP_PM_OPS(snd_sof_suspend, snd_sof_resume) 41 + RUNTIME_PM_OPS(snd_sof_runtime_suspend, snd_sof_runtime_resume, 42 + snd_sof_runtime_idle) 43 43 }; 44 - EXPORT_SYMBOL_NS(sof_acpi_pm, "SND_SOC_SOF_ACPI_DEV"); 45 44 46 45 static void sof_acpi_probe_complete(struct device *dev) 47 46 {
+3 -5
sound/soc/sof/sof-of-dev.c
··· 30 30 module_param(tplg_filename, charp, 0444); 31 31 MODULE_PARM_DESC(tplg_filename, "deprecated - moved to snd-sof module."); 32 32 33 - const struct dev_pm_ops sof_of_pm = { 33 + EXPORT_DEV_PM_OPS(sof_of_pm) = { 34 34 .prepare = snd_sof_prepare, 35 35 .complete = snd_sof_complete, 36 - SET_SYSTEM_SLEEP_PM_OPS(snd_sof_suspend, snd_sof_resume) 37 - SET_RUNTIME_PM_OPS(snd_sof_runtime_suspend, snd_sof_runtime_resume, 38 - NULL) 36 + SYSTEM_SLEEP_PM_OPS(snd_sof_suspend, snd_sof_resume) 37 + RUNTIME_PM_OPS(snd_sof_runtime_suspend, snd_sof_runtime_resume, NULL) 39 38 }; 40 - EXPORT_SYMBOL(sof_of_pm); 41 39 42 40 static void sof_of_probe_complete(struct device *dev) 43 41 {
+4 -5
sound/soc/sof/sof-pci-dev.c
··· 155 155 {}, 156 156 }; 157 157 158 - const struct dev_pm_ops sof_pci_pm = { 158 + EXPORT_NS_DEV_PM_OPS(sof_pci_pm, SND_SOC_SOF_PCI_DEV) = { 159 159 .prepare = snd_sof_prepare, 160 160 .complete = snd_sof_complete, 161 - SET_SYSTEM_SLEEP_PM_OPS(snd_sof_suspend, snd_sof_resume) 162 - SET_RUNTIME_PM_OPS(snd_sof_runtime_suspend, snd_sof_runtime_resume, 163 - snd_sof_runtime_idle) 161 + SYSTEM_SLEEP_PM_OPS(snd_sof_suspend, snd_sof_resume) 162 + RUNTIME_PM_OPS(snd_sof_runtime_suspend, snd_sof_runtime_resume, 163 + snd_sof_runtime_idle) 164 164 }; 165 - EXPORT_SYMBOL_NS(sof_pci_pm, "SND_SOC_SOF_PCI_DEV"); 166 165 167 166 static void sof_pci_probe_complete(struct device *dev) 168 167 {
+2 -4
sound/soc/stm/stm32_i2s.c
··· 1352 1352 1353 1353 MODULE_DEVICE_TABLE(of, stm32_i2s_ids); 1354 1354 1355 - #ifdef CONFIG_PM_SLEEP 1356 1355 static int stm32_i2s_suspend(struct device *dev) 1357 1356 { 1358 1357 struct stm32_i2s_data *i2s = dev_get_drvdata(dev); ··· 1369 1370 regcache_cache_only(i2s->regmap, false); 1370 1371 return regcache_sync(i2s->regmap); 1371 1372 } 1372 - #endif /* CONFIG_PM_SLEEP */ 1373 1373 1374 1374 static const struct dev_pm_ops stm32_i2s_pm_ops = { 1375 - SET_SYSTEM_SLEEP_PM_OPS(stm32_i2s_suspend, stm32_i2s_resume) 1375 + SYSTEM_SLEEP_PM_OPS(stm32_i2s_suspend, stm32_i2s_resume) 1376 1376 }; 1377 1377 1378 1378 static struct platform_driver stm32_i2s_driver = { 1379 1379 .driver = { 1380 1380 .name = "st,stm32-i2s", 1381 1381 .of_match_table = stm32_i2s_ids, 1382 - .pm = &stm32_i2s_pm_ops, 1382 + .pm = pm_ptr(&stm32_i2s_pm_ops), 1383 1383 }, 1384 1384 .probe = stm32_i2s_probe, 1385 1385 .remove = stm32_i2s_remove,
+2 -4
sound/soc/stm/stm32_sai.c
··· 270 270 return devm_of_platform_populate(&pdev->dev); 271 271 } 272 272 273 - #ifdef CONFIG_PM_SLEEP 274 273 /* 275 274 * When pins are shared by two sai sub instances, pins have to be defined 276 275 * in sai parent node. In this case, pins state is not managed by alsa fw. ··· 304 305 305 306 return pinctrl_pm_select_default_state(dev); 306 307 } 307 - #endif /* CONFIG_PM_SLEEP */ 308 308 309 309 static const struct dev_pm_ops stm32_sai_pm_ops = { 310 - SET_SYSTEM_SLEEP_PM_OPS(stm32_sai_suspend, stm32_sai_resume) 310 + SYSTEM_SLEEP_PM_OPS(stm32_sai_suspend, stm32_sai_resume) 311 311 }; 312 312 313 313 MODULE_DEVICE_TABLE(of, stm32_sai_ids); ··· 315 317 .driver = { 316 318 .name = "st,stm32-sai", 317 319 .of_match_table = stm32_sai_ids, 318 - .pm = &stm32_sai_pm_ops, 320 + .pm = pm_ptr(&stm32_sai_pm_ops), 319 321 }, 320 322 .probe = stm32_sai_probe, 321 323 };
+2 -4
sound/soc/stm/stm32_sai_sub.c
··· 1704 1704 pm_runtime_disable(&pdev->dev); 1705 1705 } 1706 1706 1707 - #ifdef CONFIG_PM_SLEEP 1708 1707 static int stm32_sai_sub_suspend(struct device *dev) 1709 1708 { 1710 1709 struct stm32_sai_sub_data *sai = dev_get_drvdata(dev); ··· 1737 1738 1738 1739 return ret; 1739 1740 } 1740 - #endif /* CONFIG_PM_SLEEP */ 1741 1741 1742 1742 static const struct dev_pm_ops stm32_sai_sub_pm_ops = { 1743 - SET_SYSTEM_SLEEP_PM_OPS(stm32_sai_sub_suspend, stm32_sai_sub_resume) 1743 + SYSTEM_SLEEP_PM_OPS(stm32_sai_sub_suspend, stm32_sai_sub_resume) 1744 1744 }; 1745 1745 1746 1746 static struct platform_driver stm32_sai_sub_driver = { 1747 1747 .driver = { 1748 1748 .name = "st,stm32-sai-sub", 1749 1749 .of_match_table = stm32_sai_sub_ids, 1750 - .pm = &stm32_sai_sub_pm_ops, 1750 + .pm = pm_ptr(&stm32_sai_sub_pm_ops), 1751 1751 }, 1752 1752 .probe = stm32_sai_sub_probe, 1753 1753 .remove = stm32_sai_sub_remove,
+2 -4
sound/soc/stm/stm32_spdifrx.c
··· 1040 1040 1041 1041 MODULE_DEVICE_TABLE(of, stm32_spdifrx_ids); 1042 1042 1043 - #ifdef CONFIG_PM_SLEEP 1044 1043 static int stm32_spdifrx_suspend(struct device *dev) 1045 1044 { 1046 1045 struct stm32_spdifrx_data *spdifrx = dev_get_drvdata(dev); ··· 1058 1059 1059 1060 return regcache_sync(spdifrx->regmap); 1060 1061 } 1061 - #endif /* CONFIG_PM_SLEEP */ 1062 1062 1063 1063 static const struct dev_pm_ops stm32_spdifrx_pm_ops = { 1064 - SET_SYSTEM_SLEEP_PM_OPS(stm32_spdifrx_suspend, stm32_spdifrx_resume) 1064 + SYSTEM_SLEEP_PM_OPS(stm32_spdifrx_suspend, stm32_spdifrx_resume) 1065 1065 }; 1066 1066 1067 1067 static struct platform_driver stm32_spdifrx_driver = { 1068 1068 .driver = { 1069 1069 .name = "st,stm32-spdifrx", 1070 1070 .of_match_table = stm32_spdifrx_ids, 1071 - .pm = &stm32_spdifrx_pm_ops, 1071 + .pm = pm_ptr(&stm32_spdifrx_pm_ops), 1072 1072 }, 1073 1073 .probe = stm32_spdifrx_probe, 1074 1074 .remove = stm32_spdifrx_remove,
+3 -3
sound/soc/sunxi/sun4i-spdif.c
··· 727 727 } 728 728 729 729 static const struct dev_pm_ops sun4i_spdif_pm = { 730 - SET_RUNTIME_PM_OPS(sun4i_spdif_runtime_suspend, 731 - sun4i_spdif_runtime_resume, NULL) 730 + RUNTIME_PM_OPS(sun4i_spdif_runtime_suspend, 731 + sun4i_spdif_runtime_resume, NULL) 732 732 }; 733 733 734 734 static struct platform_driver sun4i_spdif_driver = { 735 735 .driver = { 736 736 .name = "sun4i-spdif", 737 737 .of_match_table = sun4i_spdif_of_match, 738 - .pm = &sun4i_spdif_pm, 738 + .pm = pm_ptr(&sun4i_spdif_pm), 739 739 }, 740 740 .probe = sun4i_spdif_probe, 741 741 .remove = sun4i_spdif_remove,
+3 -3
sound/soc/sunxi/sun50i-dmic.c
··· 415 415 } 416 416 417 417 static const struct dev_pm_ops sun50i_dmic_pm = { 418 - SET_RUNTIME_PM_OPS(sun50i_dmic_runtime_suspend, 419 - sun50i_dmic_runtime_resume, NULL) 418 + RUNTIME_PM_OPS(sun50i_dmic_runtime_suspend, 419 + sun50i_dmic_runtime_resume, NULL) 420 420 }; 421 421 422 422 static struct platform_driver sun50i_dmic_driver = { 423 423 .driver = { 424 424 .name = "sun50i-dmic", 425 425 .of_match_table = sun50i_dmic_of_match, 426 - .pm = &sun50i_dmic_pm, 426 + .pm = pm_ptr(&sun50i_dmic_pm), 427 427 }, 428 428 .probe = sun50i_dmic_probe, 429 429 .remove = sun50i_dmic_remove,
+3 -3
sound/soc/sunxi/sun8i-codec.c
··· 1702 1702 MODULE_DEVICE_TABLE(of, sun8i_codec_of_match); 1703 1703 1704 1704 static const struct dev_pm_ops sun8i_codec_pm_ops = { 1705 - SET_RUNTIME_PM_OPS(sun8i_codec_runtime_suspend, 1706 - sun8i_codec_runtime_resume, NULL) 1705 + RUNTIME_PM_OPS(sun8i_codec_runtime_suspend, 1706 + sun8i_codec_runtime_resume, NULL) 1707 1707 }; 1708 1708 1709 1709 static struct platform_driver sun8i_codec_driver = { 1710 1710 .driver = { 1711 1711 .name = "sun8i-codec", 1712 1712 .of_match_table = sun8i_codec_of_match, 1713 - .pm = &sun8i_codec_pm_ops, 1713 + .pm = pm_ptr(&sun8i_codec_pm_ops), 1714 1714 }, 1715 1715 .probe = sun8i_codec_probe, 1716 1716 .remove = sun8i_codec_remove,
+6 -7
sound/soc/tegra/tegra186_asrc.c
··· 76 76 1); 77 77 } 78 78 79 - static int __maybe_unused tegra186_asrc_runtime_suspend(struct device *dev) 79 + static int tegra186_asrc_runtime_suspend(struct device *dev) 80 80 { 81 81 struct tegra186_asrc *asrc = dev_get_drvdata(dev); 82 82 ··· 86 86 return 0; 87 87 } 88 88 89 - static int __maybe_unused tegra186_asrc_runtime_resume(struct device *dev) 89 + static int tegra186_asrc_runtime_resume(struct device *dev) 90 90 { 91 91 struct tegra186_asrc *asrc = dev_get_drvdata(dev); 92 92 int id; ··· 1021 1021 } 1022 1022 1023 1023 static const struct dev_pm_ops tegra186_asrc_pm_ops = { 1024 - SET_RUNTIME_PM_OPS(tegra186_asrc_runtime_suspend, 1025 - tegra186_asrc_runtime_resume, NULL) 1026 - SET_SYSTEM_SLEEP_PM_OPS(pm_runtime_force_suspend, 1027 - pm_runtime_force_resume) 1024 + RUNTIME_PM_OPS(tegra186_asrc_runtime_suspend, 1025 + tegra186_asrc_runtime_resume, NULL) 1026 + SYSTEM_SLEEP_PM_OPS(pm_runtime_force_suspend, pm_runtime_force_resume) 1028 1027 }; 1029 1028 1030 1029 static struct platform_driver tegra186_asrc_driver = { 1031 1030 .driver = { 1032 1031 .name = "tegra186-asrc", 1033 1032 .of_match_table = tegra186_asrc_of_match, 1034 - .pm = &tegra186_asrc_pm_ops, 1033 + .pm = pm_ptr(&tegra186_asrc_pm_ops), 1035 1034 }, 1036 1035 .probe = tegra186_asrc_platform_probe, 1037 1036 .remove = tegra186_asrc_platform_remove,
+6 -7
sound/soc/tegra/tegra186_dspk.c
··· 181 181 return 1; 182 182 } 183 183 184 - static int __maybe_unused tegra186_dspk_runtime_suspend(struct device *dev) 184 + static int tegra186_dspk_runtime_suspend(struct device *dev) 185 185 { 186 186 struct tegra186_dspk *dspk = dev_get_drvdata(dev); 187 187 ··· 193 193 return 0; 194 194 } 195 195 196 - static int __maybe_unused tegra186_dspk_runtime_resume(struct device *dev) 196 + static int tegra186_dspk_runtime_resume(struct device *dev) 197 197 { 198 198 struct tegra186_dspk *dspk = dev_get_drvdata(dev); 199 199 int err; ··· 532 532 } 533 533 534 534 static const struct dev_pm_ops tegra186_dspk_pm_ops = { 535 - SET_RUNTIME_PM_OPS(tegra186_dspk_runtime_suspend, 536 - tegra186_dspk_runtime_resume, NULL) 537 - SET_SYSTEM_SLEEP_PM_OPS(pm_runtime_force_suspend, 538 - pm_runtime_force_resume) 535 + RUNTIME_PM_OPS(tegra186_dspk_runtime_suspend, 536 + tegra186_dspk_runtime_resume, NULL) 537 + SYSTEM_SLEEP_PM_OPS(pm_runtime_force_suspend, pm_runtime_force_resume) 539 538 }; 540 539 541 540 static struct platform_driver tegra186_dspk_driver = { 542 541 .driver = { 543 542 .name = "tegra186-dspk", 544 543 .of_match_table = tegra186_dspk_of_match, 545 - .pm = &tegra186_dspk_pm_ops, 544 + .pm = pm_ptr(&tegra186_dspk_pm_ops), 546 545 }, 547 546 .probe = tegra186_dspk_platform_probe, 548 547 .remove = tegra186_dspk_platform_remove,
+6 -7
sound/soc/tegra/tegra20_i2s.c
··· 34 34 35 35 #define DRV_NAME "tegra20-i2s" 36 36 37 - static __maybe_unused int tegra20_i2s_runtime_suspend(struct device *dev) 37 + static int tegra20_i2s_runtime_suspend(struct device *dev) 38 38 { 39 39 struct tegra20_i2s *i2s = dev_get_drvdata(dev); 40 40 ··· 45 45 return 0; 46 46 } 47 47 48 - static __maybe_unused int tegra20_i2s_runtime_resume(struct device *dev) 48 + static int tegra20_i2s_runtime_resume(struct device *dev) 49 49 { 50 50 struct tegra20_i2s *i2s = dev_get_drvdata(dev); 51 51 int ret; ··· 487 487 }; 488 488 489 489 static const struct dev_pm_ops tegra20_i2s_pm_ops = { 490 - SET_RUNTIME_PM_OPS(tegra20_i2s_runtime_suspend, 491 - tegra20_i2s_runtime_resume, NULL) 492 - SET_SYSTEM_SLEEP_PM_OPS(pm_runtime_force_suspend, 493 - pm_runtime_force_resume) 490 + RUNTIME_PM_OPS(tegra20_i2s_runtime_suspend, 491 + tegra20_i2s_runtime_resume, NULL) 492 + SYSTEM_SLEEP_PM_OPS(pm_runtime_force_suspend, pm_runtime_force_resume) 494 493 }; 495 494 496 495 static struct platform_driver tegra20_i2s_driver = { 497 496 .driver = { 498 497 .name = DRV_NAME, 499 498 .of_match_table = tegra20_i2s_of_match, 500 - .pm = &tegra20_i2s_pm_ops, 499 + .pm = pm_ptr(&tegra20_i2s_pm_ops), 501 500 }, 502 501 .probe = tegra20_i2s_platform_probe, 503 502 .remove = tegra20_i2s_platform_remove,
+6 -7
sound/soc/tegra/tegra20_spdif.c
··· 25 25 26 26 #include "tegra20_spdif.h" 27 27 28 - static __maybe_unused int tegra20_spdif_runtime_suspend(struct device *dev) 28 + static int tegra20_spdif_runtime_suspend(struct device *dev) 29 29 { 30 30 struct tegra20_spdif *spdif = dev_get_drvdata(dev); 31 31 ··· 36 36 return 0; 37 37 } 38 38 39 - static __maybe_unused int tegra20_spdif_runtime_resume(struct device *dev) 39 + static int tegra20_spdif_runtime_resume(struct device *dev) 40 40 { 41 41 struct tegra20_spdif *spdif = dev_get_drvdata(dev); 42 42 int ret; ··· 403 403 } 404 404 405 405 static const struct dev_pm_ops tegra20_spdif_pm_ops = { 406 - SET_RUNTIME_PM_OPS(tegra20_spdif_runtime_suspend, 407 - tegra20_spdif_runtime_resume, NULL) 408 - SET_SYSTEM_SLEEP_PM_OPS(pm_runtime_force_suspend, 409 - pm_runtime_force_resume) 406 + RUNTIME_PM_OPS(tegra20_spdif_runtime_suspend, 407 + tegra20_spdif_runtime_resume, NULL) 408 + SYSTEM_SLEEP_PM_OPS(pm_runtime_force_suspend, pm_runtime_force_resume) 410 409 }; 411 410 412 411 static const struct of_device_id tegra20_spdif_of_match[] = { ··· 417 418 static struct platform_driver tegra20_spdif_driver = { 418 419 .driver = { 419 420 .name = "tegra20-spdif", 420 - .pm = &tegra20_spdif_pm_ops, 421 + .pm = pm_ptr(&tegra20_spdif_pm_ops), 421 422 .of_match_table = tegra20_spdif_of_match, 422 423 }, 423 424 .probe = tegra20_spdif_platform_probe,
+6 -7
sound/soc/tegra/tegra210_admaif.c
··· 220 220 .cache_type = REGCACHE_FLAT, 221 221 }; 222 222 223 - static int __maybe_unused tegra_admaif_runtime_suspend(struct device *dev) 223 + static int tegra_admaif_runtime_suspend(struct device *dev) 224 224 { 225 225 struct tegra_admaif *admaif = dev_get_drvdata(dev); 226 226 ··· 230 230 return 0; 231 231 } 232 232 233 - static int __maybe_unused tegra_admaif_runtime_resume(struct device *dev) 233 + static int tegra_admaif_runtime_resume(struct device *dev) 234 234 { 235 235 struct tegra_admaif *admaif = dev_get_drvdata(dev); 236 236 ··· 877 877 } 878 878 879 879 static const struct dev_pm_ops tegra_admaif_pm_ops = { 880 - SET_RUNTIME_PM_OPS(tegra_admaif_runtime_suspend, 881 - tegra_admaif_runtime_resume, NULL) 882 - SET_SYSTEM_SLEEP_PM_OPS(pm_runtime_force_suspend, 883 - pm_runtime_force_resume) 880 + RUNTIME_PM_OPS(tegra_admaif_runtime_suspend, 881 + tegra_admaif_runtime_resume, NULL) 882 + SYSTEM_SLEEP_PM_OPS(pm_runtime_force_suspend, pm_runtime_force_resume) 884 883 }; 885 884 886 885 static struct platform_driver tegra_admaif_driver = { ··· 888 889 .driver = { 889 890 .name = "tegra210-admaif", 890 891 .of_match_table = tegra_admaif_of_match, 891 - .pm = &tegra_admaif_pm_ops, 892 + .pm = pm_ptr(&tegra_admaif_pm_ops), 892 893 }, 893 894 }; 894 895 module_platform_driver(tegra_admaif_driver);
+6 -7
sound/soc/tegra/tegra210_adx.c
··· 84 84 return 0; 85 85 } 86 86 87 - static int __maybe_unused tegra210_adx_runtime_suspend(struct device *dev) 87 + static int tegra210_adx_runtime_suspend(struct device *dev) 88 88 { 89 89 struct tegra210_adx *adx = dev_get_drvdata(dev); 90 90 ··· 94 94 return 0; 95 95 } 96 96 97 - static int __maybe_unused tegra210_adx_runtime_resume(struct device *dev) 97 + static int tegra210_adx_runtime_resume(struct device *dev) 98 98 { 99 99 struct tegra210_adx *adx = dev_get_drvdata(dev); 100 100 ··· 524 524 } 525 525 526 526 static const struct dev_pm_ops tegra210_adx_pm_ops = { 527 - SET_RUNTIME_PM_OPS(tegra210_adx_runtime_suspend, 528 - tegra210_adx_runtime_resume, NULL) 529 - SET_SYSTEM_SLEEP_PM_OPS(pm_runtime_force_suspend, 530 - pm_runtime_force_resume) 527 + RUNTIME_PM_OPS(tegra210_adx_runtime_suspend, 528 + tegra210_adx_runtime_resume, NULL) 529 + SYSTEM_SLEEP_PM_OPS(pm_runtime_force_suspend, pm_runtime_force_resume) 531 530 }; 532 531 533 532 static struct platform_driver tegra210_adx_driver = { 534 533 .driver = { 535 534 .name = "tegra210-adx", 536 535 .of_match_table = tegra210_adx_of_match, 537 - .pm = &tegra210_adx_pm_ops, 536 + .pm = pm_ptr(&tegra210_adx_pm_ops), 538 537 }, 539 538 .probe = tegra210_adx_platform_probe, 540 539 .remove = tegra210_adx_platform_remove,
+6 -7
sound/soc/tegra/tegra210_ahub.c
··· 1319 1319 }; 1320 1320 MODULE_DEVICE_TABLE(of, tegra_ahub_of_match); 1321 1321 1322 - static int __maybe_unused tegra_ahub_runtime_suspend(struct device *dev) 1322 + static int tegra_ahub_runtime_suspend(struct device *dev) 1323 1323 { 1324 1324 struct tegra_ahub *ahub = dev_get_drvdata(dev); 1325 1325 ··· 1331 1331 return 0; 1332 1332 } 1333 1333 1334 - static int __maybe_unused tegra_ahub_runtime_resume(struct device *dev) 1334 + static int tegra_ahub_runtime_resume(struct device *dev) 1335 1335 { 1336 1336 struct tegra_ahub *ahub = dev_get_drvdata(dev); 1337 1337 int err; ··· 1408 1408 } 1409 1409 1410 1410 static const struct dev_pm_ops tegra_ahub_pm_ops = { 1411 - SET_RUNTIME_PM_OPS(tegra_ahub_runtime_suspend, 1412 - tegra_ahub_runtime_resume, NULL) 1413 - SET_SYSTEM_SLEEP_PM_OPS(pm_runtime_force_suspend, 1414 - pm_runtime_force_resume) 1411 + RUNTIME_PM_OPS(tegra_ahub_runtime_suspend, 1412 + tegra_ahub_runtime_resume, NULL) 1413 + SYSTEM_SLEEP_PM_OPS(pm_runtime_force_suspend, pm_runtime_force_resume) 1415 1414 }; 1416 1415 1417 1416 static struct platform_driver tegra_ahub_driver = { ··· 1419 1420 .driver = { 1420 1421 .name = "tegra210-ahub", 1421 1422 .of_match_table = tegra_ahub_of_match, 1422 - .pm = &tegra_ahub_pm_ops, 1423 + .pm = pm_ptr(&tegra_ahub_pm_ops), 1423 1424 }, 1424 1425 }; 1425 1426 module_platform_driver(tegra_ahub_driver);
+6 -7
sound/soc/tegra/tegra210_amx.c
··· 98 98 return 0; 99 99 } 100 100 101 - static int __maybe_unused tegra210_amx_runtime_suspend(struct device *dev) 101 + static int tegra210_amx_runtime_suspend(struct device *dev) 102 102 { 103 103 struct tegra210_amx *amx = dev_get_drvdata(dev); 104 104 ··· 108 108 return 0; 109 109 } 110 110 111 - static int __maybe_unused tegra210_amx_runtime_resume(struct device *dev) 111 + static int tegra210_amx_runtime_resume(struct device *dev) 112 112 { 113 113 struct tegra210_amx *amx = dev_get_drvdata(dev); 114 114 ··· 581 581 } 582 582 583 583 static const struct dev_pm_ops tegra210_amx_pm_ops = { 584 - SET_RUNTIME_PM_OPS(tegra210_amx_runtime_suspend, 585 - tegra210_amx_runtime_resume, NULL) 586 - SET_SYSTEM_SLEEP_PM_OPS(pm_runtime_force_suspend, 587 - pm_runtime_force_resume) 584 + RUNTIME_PM_OPS(tegra210_amx_runtime_suspend, 585 + tegra210_amx_runtime_resume, NULL) 586 + SYSTEM_SLEEP_PM_OPS(pm_runtime_force_suspend, pm_runtime_force_resume) 588 587 }; 589 588 590 589 static struct platform_driver tegra210_amx_driver = { 591 590 .driver = { 592 591 .name = "tegra210-amx", 593 592 .of_match_table = tegra210_amx_of_match, 594 - .pm = &tegra210_amx_pm_ops, 593 + .pm = pm_ptr(&tegra210_amx_pm_ops), 595 594 }, 596 595 .probe = tegra210_amx_platform_probe, 597 596 .remove = tegra210_amx_platform_remove,
+6 -7
sound/soc/tegra/tegra210_dmic.c
··· 40 40 { TEGRA210_DMIC_LP_BIQUAD_1_COEF_4, 0x0 }, 41 41 }; 42 42 43 - static int __maybe_unused tegra210_dmic_runtime_suspend(struct device *dev) 43 + static int tegra210_dmic_runtime_suspend(struct device *dev) 44 44 { 45 45 struct tegra210_dmic *dmic = dev_get_drvdata(dev); 46 46 ··· 52 52 return 0; 53 53 } 54 54 55 - static int __maybe_unused tegra210_dmic_runtime_resume(struct device *dev) 55 + static int tegra210_dmic_runtime_resume(struct device *dev) 56 56 { 57 57 struct tegra210_dmic *dmic = dev_get_drvdata(dev); 58 58 int err; ··· 543 543 } 544 544 545 545 static const struct dev_pm_ops tegra210_dmic_pm_ops = { 546 - SET_RUNTIME_PM_OPS(tegra210_dmic_runtime_suspend, 547 - tegra210_dmic_runtime_resume, NULL) 548 - SET_SYSTEM_SLEEP_PM_OPS(pm_runtime_force_suspend, 549 - pm_runtime_force_resume) 546 + RUNTIME_PM_OPS(tegra210_dmic_runtime_suspend, 547 + tegra210_dmic_runtime_resume, NULL) 548 + SYSTEM_SLEEP_PM_OPS(pm_runtime_force_suspend, pm_runtime_force_resume) 550 549 }; 551 550 552 551 static const struct of_device_id tegra210_dmic_of_match[] = { ··· 558 559 .driver = { 559 560 .name = "tegra210-dmic", 560 561 .of_match_table = tegra210_dmic_of_match, 561 - .pm = &tegra210_dmic_pm_ops, 562 + .pm = pm_ptr(&tegra210_dmic_pm_ops), 562 563 }, 563 564 .probe = tegra210_dmic_probe, 564 565 .remove = tegra210_dmic_remove,
+6 -7
sound/soc/tegra/tegra210_i2s.c
··· 166 166 return tegra210_i2s_sw_reset(compnt, stream); 167 167 } 168 168 169 - static int __maybe_unused tegra210_i2s_runtime_suspend(struct device *dev) 169 + static int tegra210_i2s_runtime_suspend(struct device *dev) 170 170 { 171 171 struct tegra210_i2s *i2s = dev_get_drvdata(dev); 172 172 ··· 178 178 return 0; 179 179 } 180 180 181 - static int __maybe_unused tegra210_i2s_runtime_resume(struct device *dev) 181 + static int tegra210_i2s_runtime_resume(struct device *dev) 182 182 { 183 183 struct tegra210_i2s *i2s = dev_get_drvdata(dev); 184 184 int err; ··· 1010 1010 } 1011 1011 1012 1012 static const struct dev_pm_ops tegra210_i2s_pm_ops = { 1013 - SET_RUNTIME_PM_OPS(tegra210_i2s_runtime_suspend, 1014 - tegra210_i2s_runtime_resume, NULL) 1015 - SET_SYSTEM_SLEEP_PM_OPS(pm_runtime_force_suspend, 1016 - pm_runtime_force_resume) 1013 + RUNTIME_PM_OPS(tegra210_i2s_runtime_suspend, 1014 + tegra210_i2s_runtime_resume, NULL) 1015 + SYSTEM_SLEEP_PM_OPS(pm_runtime_force_suspend, pm_runtime_force_resume) 1017 1016 }; 1018 1017 1019 1018 static const struct of_device_id tegra210_i2s_of_match[] = { ··· 1025 1026 .driver = { 1026 1027 .name = "tegra210-i2s", 1027 1028 .of_match_table = tegra210_i2s_of_match, 1028 - .pm = &tegra210_i2s_pm_ops, 1029 + .pm = pm_ptr(&tegra210_i2s_pm_ops), 1029 1030 }, 1030 1031 .probe = tegra210_i2s_probe, 1031 1032 .remove = tegra210_i2s_remove,
+6 -7
sound/soc/tegra/tegra210_mixer.c
··· 73 73 { 0, 0, 0x400, 0x8000000 }, 74 74 }; 75 75 76 - static int __maybe_unused tegra210_mixer_runtime_suspend(struct device *dev) 76 + static int tegra210_mixer_runtime_suspend(struct device *dev) 77 77 { 78 78 struct tegra210_mixer *mixer = dev_get_drvdata(dev); 79 79 ··· 83 83 return 0; 84 84 } 85 85 86 - static int __maybe_unused tegra210_mixer_runtime_resume(struct device *dev) 86 + static int tegra210_mixer_runtime_resume(struct device *dev) 87 87 { 88 88 struct tegra210_mixer *mixer = dev_get_drvdata(dev); 89 89 ··· 666 666 } 667 667 668 668 static const struct dev_pm_ops tegra210_mixer_pm_ops = { 669 - SET_RUNTIME_PM_OPS(tegra210_mixer_runtime_suspend, 670 - tegra210_mixer_runtime_resume, NULL) 671 - SET_SYSTEM_SLEEP_PM_OPS(pm_runtime_force_suspend, 672 - pm_runtime_force_resume) 669 + RUNTIME_PM_OPS(tegra210_mixer_runtime_suspend, 670 + tegra210_mixer_runtime_resume, NULL) 671 + SYSTEM_SLEEP_PM_OPS(pm_runtime_force_suspend, pm_runtime_force_resume) 673 672 }; 674 673 675 674 static struct platform_driver tegra210_mixer_driver = { 676 675 .driver = { 677 676 .name = "tegra210_mixer", 678 677 .of_match_table = tegra210_mixer_of_match, 679 - .pm = &tegra210_mixer_pm_ops, 678 + .pm = pm_ptr(&tegra210_mixer_pm_ops), 680 679 }, 681 680 .probe = tegra210_mixer_platform_probe, 682 681 .remove = tegra210_mixer_platform_remove,
+6 -7
sound/soc/tegra/tegra210_mvc.c
··· 47 47 .duration_inv = 14316558, 48 48 }; 49 49 50 - static int __maybe_unused tegra210_mvc_runtime_suspend(struct device *dev) 50 + static int tegra210_mvc_runtime_suspend(struct device *dev) 51 51 { 52 52 struct tegra210_mvc *mvc = dev_get_drvdata(dev); 53 53 ··· 59 59 return 0; 60 60 } 61 61 62 - static int __maybe_unused tegra210_mvc_runtime_resume(struct device *dev) 62 + static int tegra210_mvc_runtime_resume(struct device *dev) 63 63 { 64 64 struct tegra210_mvc *mvc = dev_get_drvdata(dev); 65 65 ··· 758 758 } 759 759 760 760 static const struct dev_pm_ops tegra210_mvc_pm_ops = { 761 - SET_RUNTIME_PM_OPS(tegra210_mvc_runtime_suspend, 762 - tegra210_mvc_runtime_resume, NULL) 763 - SET_SYSTEM_SLEEP_PM_OPS(pm_runtime_force_suspend, 764 - pm_runtime_force_resume) 761 + RUNTIME_PM_OPS(tegra210_mvc_runtime_suspend, 762 + tegra210_mvc_runtime_resume, NULL) 763 + SYSTEM_SLEEP_PM_OPS(pm_runtime_force_suspend, pm_runtime_force_resume) 765 764 }; 766 765 767 766 static struct platform_driver tegra210_mvc_driver = { 768 767 .driver = { 769 768 .name = "tegra210-mvc", 770 769 .of_match_table = tegra210_mvc_of_match, 771 - .pm = &tegra210_mvc_pm_ops, 770 + .pm = pm_ptr(&tegra210_mvc_pm_ops), 772 771 }, 773 772 .probe = tegra210_mvc_platform_probe, 774 773 .remove = tegra210_mvc_platform_remove,
+6 -7
sound/soc/tegra/tegra210_ope.c
··· 356 356 pm_runtime_disable(&pdev->dev); 357 357 } 358 358 359 - static int __maybe_unused tegra210_ope_runtime_suspend(struct device *dev) 359 + static int tegra210_ope_runtime_suspend(struct device *dev) 360 360 { 361 361 struct tegra210_ope *ope = dev_get_drvdata(dev); 362 362 ··· 374 374 return 0; 375 375 } 376 376 377 - static int __maybe_unused tegra210_ope_runtime_resume(struct device *dev) 377 + static int tegra210_ope_runtime_resume(struct device *dev) 378 378 { 379 379 struct tegra210_ope *ope = dev_get_drvdata(dev); 380 380 ··· 393 393 } 394 394 395 395 static const struct dev_pm_ops tegra210_ope_pm_ops = { 396 - SET_RUNTIME_PM_OPS(tegra210_ope_runtime_suspend, 397 - tegra210_ope_runtime_resume, NULL) 398 - SET_SYSTEM_SLEEP_PM_OPS(pm_runtime_force_suspend, 399 - pm_runtime_force_resume) 396 + RUNTIME_PM_OPS(tegra210_ope_runtime_suspend, 397 + tegra210_ope_runtime_resume, NULL) 398 + SYSTEM_SLEEP_PM_OPS(pm_runtime_force_suspend, pm_runtime_force_resume) 400 399 }; 401 400 402 401 static const struct of_device_id tegra210_ope_of_match[] = { ··· 408 409 .driver = { 409 410 .name = "tegra210-ope", 410 411 .of_match_table = tegra210_ope_of_match, 411 - .pm = &tegra210_ope_pm_ops, 412 + .pm = pm_ptr(&tegra210_ope_pm_ops), 412 413 }, 413 414 .probe = tegra210_ope_probe, 414 415 .remove = tegra210_ope_remove,
+6 -7
sound/soc/tegra/tegra210_sfc.c
··· 3056 3056 }, 3057 3057 }; 3058 3058 3059 - static int __maybe_unused tegra210_sfc_runtime_suspend(struct device *dev) 3059 + static int tegra210_sfc_runtime_suspend(struct device *dev) 3060 3060 { 3061 3061 struct tegra210_sfc *sfc = dev_get_drvdata(dev); 3062 3062 ··· 3066 3066 return 0; 3067 3067 } 3068 3068 3069 - static int __maybe_unused tegra210_sfc_runtime_resume(struct device *dev) 3069 + static int tegra210_sfc_runtime_resume(struct device *dev) 3070 3070 { 3071 3071 struct tegra210_sfc *sfc = dev_get_drvdata(dev); 3072 3072 ··· 3623 3623 } 3624 3624 3625 3625 static const struct dev_pm_ops tegra210_sfc_pm_ops = { 3626 - SET_RUNTIME_PM_OPS(tegra210_sfc_runtime_suspend, 3627 - tegra210_sfc_runtime_resume, NULL) 3628 - SET_SYSTEM_SLEEP_PM_OPS(pm_runtime_force_suspend, 3629 - pm_runtime_force_resume) 3626 + RUNTIME_PM_OPS(tegra210_sfc_runtime_suspend, 3627 + tegra210_sfc_runtime_resume, NULL) 3628 + SYSTEM_SLEEP_PM_OPS(pm_runtime_force_suspend, pm_runtime_force_resume) 3630 3629 }; 3631 3630 3632 3631 static struct platform_driver tegra210_sfc_driver = { 3633 3632 .driver = { 3634 3633 .name = "tegra210-sfc", 3635 3634 .of_match_table = tegra210_sfc_of_match, 3636 - .pm = &tegra210_sfc_pm_ops, 3635 + .pm = pm_ptr(&tegra210_sfc_pm_ops), 3637 3636 }, 3638 3637 .probe = tegra210_sfc_platform_probe, 3639 3638 .remove = tegra210_sfc_platform_remove,
+6 -7
sound/soc/tegra/tegra30_ahub.c
··· 40 40 regmap_write(ahub->regmap_ahub, reg, val); 41 41 } 42 42 43 - static __maybe_unused int tegra30_ahub_runtime_suspend(struct device *dev) 43 + static int tegra30_ahub_runtime_suspend(struct device *dev) 44 44 { 45 45 regcache_cache_only(ahub->regmap_apbif, true); 46 46 regcache_cache_only(ahub->regmap_ahub, true); ··· 61 61 * stopping streams should dynamically adjust the clock as required. However, 62 62 * this is not yet implemented. 63 63 */ 64 - static __maybe_unused int tegra30_ahub_runtime_resume(struct device *dev) 64 + static int tegra30_ahub_runtime_resume(struct device *dev) 65 65 { 66 66 int ret; 67 67 ··· 600 600 } 601 601 602 602 static const struct dev_pm_ops tegra30_ahub_pm_ops = { 603 - SET_RUNTIME_PM_OPS(tegra30_ahub_runtime_suspend, 604 - tegra30_ahub_runtime_resume, NULL) 605 - SET_SYSTEM_SLEEP_PM_OPS(pm_runtime_force_suspend, 606 - pm_runtime_force_resume) 603 + RUNTIME_PM_OPS(tegra30_ahub_runtime_suspend, 604 + tegra30_ahub_runtime_resume, NULL) 605 + SYSTEM_SLEEP_PM_OPS(pm_runtime_force_suspend, pm_runtime_force_resume) 607 606 }; 608 607 609 608 static struct platform_driver tegra30_ahub_driver = { ··· 611 612 .driver = { 612 613 .name = DRV_NAME, 613 614 .of_match_table = tegra30_ahub_of_match, 614 - .pm = &tegra30_ahub_pm_ops, 615 + .pm = pm_ptr(&tegra30_ahub_pm_ops), 615 616 }, 616 617 }; 617 618 module_platform_driver(tegra30_ahub_driver);
+6 -7
sound/soc/tegra/tegra30_i2s.c
··· 35 35 36 36 #define DRV_NAME "tegra30-i2s" 37 37 38 - static __maybe_unused int tegra30_i2s_runtime_suspend(struct device *dev) 38 + static int tegra30_i2s_runtime_suspend(struct device *dev) 39 39 { 40 40 struct tegra30_i2s *i2s = dev_get_drvdata(dev); 41 41 ··· 46 46 return 0; 47 47 } 48 48 49 - static __maybe_unused int tegra30_i2s_runtime_resume(struct device *dev) 49 + static int tegra30_i2s_runtime_resume(struct device *dev) 50 50 { 51 51 struct tegra30_i2s *i2s = dev_get_drvdata(dev); 52 52 int ret; ··· 547 547 } 548 548 549 549 static const struct dev_pm_ops tegra30_i2s_pm_ops = { 550 - SET_RUNTIME_PM_OPS(tegra30_i2s_runtime_suspend, 551 - tegra30_i2s_runtime_resume, NULL) 552 - SET_SYSTEM_SLEEP_PM_OPS(pm_runtime_force_suspend, 553 - pm_runtime_force_resume) 550 + RUNTIME_PM_OPS(tegra30_i2s_runtime_suspend, 551 + tegra30_i2s_runtime_resume, NULL) 552 + SYSTEM_SLEEP_PM_OPS(pm_runtime_force_suspend, pm_runtime_force_resume) 554 553 }; 555 554 556 555 static struct platform_driver tegra30_i2s_driver = { 557 556 .driver = { 558 557 .name = DRV_NAME, 559 558 .of_match_table = tegra30_i2s_of_match, 560 - .pm = &tegra30_i2s_pm_ops, 559 + .pm = pm_ptr(&tegra30_i2s_pm_ops), 561 560 }, 562 561 .probe = tegra30_i2s_platform_probe, 563 562 .remove = tegra30_i2s_platform_remove,
+3 -3
sound/soc/xtensa/xtfpga-i2s.c
··· 629 629 #endif 630 630 631 631 static const struct dev_pm_ops xtfpga_i2s_pm_ops = { 632 - SET_RUNTIME_PM_OPS(xtfpga_i2s_runtime_suspend, 633 - xtfpga_i2s_runtime_resume, NULL) 632 + RUNTIME_PM_OPS(xtfpga_i2s_runtime_suspend, 633 + xtfpga_i2s_runtime_resume, NULL) 634 634 }; 635 635 636 636 static struct platform_driver xtfpga_i2s_driver = { ··· 639 639 .driver = { 640 640 .name = "xtfpga-i2s", 641 641 .of_match_table = of_match_ptr(xtfpga_i2s_of_match), 642 - .pm = &xtfpga_i2s_pm_ops, 642 + .pm = pm_ptr(&xtfpga_i2s_pm_ops), 643 643 }, 644 644 }; 645 645