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

uio: uio_dmem_genirq: 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.

As the Runtime PM callbacks were the only driver-specific PM handling,
all PM handling can be removed.

Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be>
Link: https://lore.kernel.org/r/121921f66a2baa125ea62be9436e8b5b12a4ad4d.1756999182.git.geert+renesas@glider.be
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

authored by

Geert Uytterhoeven and committed by
Greg Kroah-Hartman
6a84240f 47625846

-23
-23
drivers/uio/uio_dmem_genirq.c
··· 297 297 return devm_uio_register_device(&pdev->dev, priv->uioinfo); 298 298 } 299 299 300 - static int uio_dmem_genirq_runtime_nop(struct device *dev) 301 - { 302 - /* Runtime PM callback shared between ->runtime_suspend() 303 - * and ->runtime_resume(). Simply returns success. 304 - * 305 - * In this driver pm_runtime_get_sync() and pm_runtime_put_sync() 306 - * are used at open() and release() time. This allows the 307 - * Runtime PM code to turn off power to the device while the 308 - * device is unused, ie before open() and after release(). 309 - * 310 - * This Runtime PM callback does not need to save or restore 311 - * any registers since user space is responsbile for hardware 312 - * register reinitialization after open(). 313 - */ 314 - return 0; 315 - } 316 - 317 - static const struct dev_pm_ops uio_dmem_genirq_dev_pm_ops = { 318 - .runtime_suspend = uio_dmem_genirq_runtime_nop, 319 - .runtime_resume = uio_dmem_genirq_runtime_nop, 320 - }; 321 - 322 300 #ifdef CONFIG_OF 323 301 static const struct of_device_id uio_of_genirq_match[] = { 324 302 { /* empty for now */ }, ··· 308 330 .probe = uio_dmem_genirq_probe, 309 331 .driver = { 310 332 .name = DRIVER_NAME, 311 - .pm = &uio_dmem_genirq_dev_pm_ops, 312 333 .of_match_table = of_match_ptr(uio_of_genirq_match), 313 334 }, 314 335 };