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

uio: uio_pdrv_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/a5495b6068dd4e40ae7e0fb66b067fd5b5c210b2.1756999260.git.geert+renesas@glider.be
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

authored by

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

-23
-23
drivers/uio/uio_pdrv_genirq.c
··· 249 249 return ret; 250 250 } 251 251 252 - static int uio_pdrv_genirq_runtime_nop(struct device *dev) 253 - { 254 - /* Runtime PM callback shared between ->runtime_suspend() 255 - * and ->runtime_resume(). Simply returns success. 256 - * 257 - * In this driver pm_runtime_get_sync() and pm_runtime_put_sync() 258 - * are used at open() and release() time. This allows the 259 - * Runtime PM code to turn off power to the device while the 260 - * device is unused, ie before open() and after release(). 261 - * 262 - * This Runtime PM callback does not need to save or restore 263 - * any registers since user space is responsbile for hardware 264 - * register reinitialization after open(). 265 - */ 266 - return 0; 267 - } 268 - 269 - static const struct dev_pm_ops uio_pdrv_genirq_dev_pm_ops = { 270 - .runtime_suspend = uio_pdrv_genirq_runtime_nop, 271 - .runtime_resume = uio_pdrv_genirq_runtime_nop, 272 - }; 273 - 274 252 #ifdef CONFIG_OF 275 253 static struct of_device_id uio_of_genirq_match[] = { 276 254 { /* This is filled with module_parm */ }, ··· 262 284 .probe = uio_pdrv_genirq_probe, 263 285 .driver = { 264 286 .name = DRIVER_NAME, 265 - .pm = &uio_pdrv_genirq_dev_pm_ops, 266 287 .of_match_table = of_match_ptr(uio_of_genirq_match), 267 288 }, 268 289 };