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

media: amphion: Remove dummy PM handling

Since commit 63d00be69348fda4 ("PM: runtime: Allow unassigned
->runtime_suspend|resume callbacks"), unassigned
.runtime_{suspend,resume}() callbacks are treated the same as dummy
callbacks that just return zero.
Unassigned system sleep callbacks were always treated the same as dummy
callbacks that just return zero.

As the driver has no other PM callbacks than dummy callbacks, all PM
handling can be removed.

Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be>
Reviewed-by: Ming Qian <ming.qian@oss.nxp.com>
Signed-off-by: Hans Verkuil <hverkuil+cisco@kernel.org>

authored by

Geert Uytterhoeven and committed by
Hans Verkuil
ae0e4aa1 959d7879

-26
-26
drivers/media/platform/amphion/vpu_drv.c
··· 175 175 mutex_destroy(&vpu->lock); 176 176 } 177 177 178 - static int __maybe_unused vpu_runtime_resume(struct device *dev) 179 - { 180 - return 0; 181 - } 182 - 183 - static int __maybe_unused vpu_runtime_suspend(struct device *dev) 184 - { 185 - return 0; 186 - } 187 - 188 - static int __maybe_unused vpu_resume(struct device *dev) 189 - { 190 - return 0; 191 - } 192 - 193 - static int __maybe_unused vpu_suspend(struct device *dev) 194 - { 195 - return 0; 196 - } 197 - 198 - static const struct dev_pm_ops vpu_pm_ops = { 199 - SET_RUNTIME_PM_OPS(vpu_runtime_suspend, vpu_runtime_resume, NULL) 200 - SET_SYSTEM_SLEEP_PM_OPS(vpu_suspend, vpu_resume) 201 - }; 202 - 203 178 static struct vpu_resources imx8qxp_res = { 204 179 .plat_type = IMX8QXP, 205 180 .mreg_base = 0x40000000, ··· 206 231 .driver = { 207 232 .name = "amphion-vpu", 208 233 .of_match_table = vpu_dt_match, 209 - .pm = &vpu_pm_ops, 210 234 }, 211 235 }; 212 236