]> git.ipfire.org Git - thirdparty/kernel/linux.git/commitdiff
uio: uio_pdrv_genirq: Remove dummy PM handling
authorGeert Uytterhoeven <geert+renesas@glider.be>
Thu, 4 Sep 2025 15:21:12 +0000 (17:21 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Sat, 6 Sep 2025 13:57:18 +0000 (15:57 +0200)
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>
drivers/uio/uio_pdrv_genirq.c

index 633ab6b916719e783d0f82cb2f8decac35a37054..0a1885d1b2e3b0594dcceb69e303098a1e1d48cb 100644 (file)
@@ -249,28 +249,6 @@ static int uio_pdrv_genirq_probe(struct platform_device *pdev)
        return ret;
 }
 
-static int uio_pdrv_genirq_runtime_nop(struct device *dev)
-{
-       /* Runtime PM callback shared between ->runtime_suspend()
-        * and ->runtime_resume(). Simply returns success.
-        *
-        * In this driver pm_runtime_get_sync() and pm_runtime_put_sync()
-        * are used at open() and release() time. This allows the
-        * Runtime PM code to turn off power to the device while the
-        * device is unused, ie before open() and after release().
-        *
-        * This Runtime PM callback does not need to save or restore
-        * any registers since user space is responsbile for hardware
-        * register reinitialization after open().
-        */
-       return 0;
-}
-
-static const struct dev_pm_ops uio_pdrv_genirq_dev_pm_ops = {
-       .runtime_suspend = uio_pdrv_genirq_runtime_nop,
-       .runtime_resume = uio_pdrv_genirq_runtime_nop,
-};
-
 #ifdef CONFIG_OF
 static struct of_device_id uio_of_genirq_match[] = {
        { /* This is filled with module_parm */ },
@@ -284,7 +262,6 @@ static struct platform_driver uio_pdrv_genirq = {
        .probe = uio_pdrv_genirq_probe,
        .driver = {
                .name = DRIVER_NAME,
-               .pm = &uio_pdrv_genirq_dev_pm_ops,
                .of_match_table = of_match_ptr(uio_of_genirq_match),
        },
 };