]> git.ipfire.org Git - thirdparty/kernel/linux.git/commitdiff
usb: Remove redundant pm_runtime_mark_last_busy() calls
authorSakari Ailus <sakari.ailus@linux.intel.com>
Tue, 11 Nov 2025 09:51:17 +0000 (11:51 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Fri, 21 Nov 2025 14:11:53 +0000 (15:11 +0100)
pm_runtime_put_autosuspend(), pm_runtime_put_sync_autosuspend(),
pm_runtime_autosuspend() and pm_request_autosuspend() now include a call
to pm_runtime_mark_last_busy(). Remove the now-reduntant explicit call to
pm_runtime_mark_last_busy().

Signed-off-by: Sakari Ailus <sakari.ailus@linux.intel.com>
Acked-by: Thierry Reding <treding@nvidia.com>
Reviewed-by: AngeloGioacchino Del Regno <angelogioacchino.delregno@collabora.com>
Acked-by: Peter Chen <peter.chen@kernel.org>
Link: https://patch.msgid.link/20251111095117.95023-1-sakari.ailus@linux.intel.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
19 files changed:
drivers/usb/cdns3/cdns3-gadget.c
drivers/usb/cdns3/cdnsp-gadget.c
drivers/usb/chipidea/core.c
drivers/usb/chipidea/otg_fsm.c
drivers/usb/dwc3/core.c
drivers/usb/dwc3/dwc3-am62.c
drivers/usb/dwc3/dwc3-imx8mp.c
drivers/usb/dwc3/dwc3-pci.c
drivers/usb/dwc3/dwc3-xilinx.c
drivers/usb/gadget/udc/cdns2/cdns2-gadget.c
drivers/usb/host/xhci-mtk.c
drivers/usb/host/xhci-tegra.c
drivers/usb/misc/apple-mfi-fastcharge.c
drivers/usb/mtu3/mtu3_plat.c
drivers/usb/musb/musb_core.c
drivers/usb/musb/musb_debugfs.c
drivers/usb/musb/musb_dsps.c
drivers/usb/musb/musb_gadget.c
drivers/usb/musb/omap2430.c

index d9d8dc05b235990b9186340b82113972bb7935e6..168707213ed9d36a754c20f56805c36985784387 100644 (file)
@@ -3251,7 +3251,6 @@ static void cdns3_gadget_exit(struct cdns *cdns)
        priv_dev = cdns->gadget_dev;
 
 
-       pm_runtime_mark_last_busy(cdns->dev);
        pm_runtime_put_autosuspend(cdns->dev);
 
        usb_del_gadget(&priv_dev->gadget);
index 0252560cbc80bd80f81128f834ca4fe011d2fda8..d37c29a253dd81872ea96afda2c0540c682ed202 100644 (file)
@@ -1999,7 +1999,6 @@ static void cdnsp_gadget_exit(struct cdns *cdns)
        struct cdnsp_device *pdev = cdns->gadget_dev;
 
        devm_free_irq(pdev->dev, cdns->dev_irq, pdev);
-       pm_runtime_mark_last_busy(cdns->dev);
        pm_runtime_put_autosuspend(cdns->dev);
        usb_del_gadget(&pdev->gadget);
        cdnsp_gadget_free_endpoints(pdev);
index 694b4a8e4e1d8583dcbf4a42f8c2dfd785d5745c..a6ce73dcc8717c41e566e5ee0d90bdae62c88315 100644 (file)
@@ -1372,7 +1372,6 @@ static int ci_controller_resume(struct device *dev)
        ci->in_lpm = false;
        if (ci->wakeup_int) {
                ci->wakeup_int = false;
-               pm_runtime_mark_last_busy(ci->dev);
                pm_runtime_put_autosuspend(ci->dev);
                enable_irq(ci->irq);
                if (ci_otg_is_fsm_mode(ci))
index a093544482d5c9103ccc4146fa1bd04822b37519..929536dc96ecb94b5942a173866543eb7e86964a 100644 (file)
@@ -629,7 +629,6 @@ int ci_otg_fsm_work(struct ci_hdrc *ci)
                                ci_otg_queue_work(ci);
                        }
                } else if (ci->fsm.otg->state == OTG_STATE_A_HOST) {
-                       pm_runtime_mark_last_busy(ci->dev);
                        pm_runtime_put_autosuspend(ci->dev);
                        return 0;
                }
index 96f85eada047949e752776c671b030a1f32da1a2..d7f340f22595adba67ecaaf27259c84b43ef5c0e 100644 (file)
@@ -282,7 +282,6 @@ static void __dwc3_set_mode(struct work_struct *work)
        }
 
 out:
-       pm_runtime_mark_last_busy(dwc->dev);
        pm_runtime_put_autosuspend(dwc->dev);
        mutex_unlock(&dwc->mutex);
 }
@@ -2658,7 +2657,6 @@ int dwc3_runtime_idle(struct dwc3 *dwc)
                break;
        }
 
-       pm_runtime_mark_last_busy(dev);
        pm_runtime_autosuspend(dev);
 
        return 0;
index 9db8f3ca493de90e0bd2c2eebd7a09676598362b..e11d7643f9669cbdcf8c89ec640ec5aa3f6a297e 100644 (file)
@@ -292,7 +292,6 @@ static int dwc3_ti_probe(struct platform_device *pdev)
        /* Setting up autosuspend */
        pm_runtime_set_autosuspend_delay(dev, DWC3_AM62_AUTOSUSPEND_DELAY);
        pm_runtime_use_autosuspend(dev);
-       pm_runtime_mark_last_busy(dev);
        pm_runtime_put_autosuspend(dev);
        return 0;
 
index bce6af82f54c24423c1e1fcc46913c8456b6f035..050da327f7858c3d5ef6895698d421b6947015a2 100644 (file)
@@ -312,7 +312,6 @@ static int dwc3_imx8mp_resume(struct dwc3_imx8mp *dwc3_imx, pm_message_t msg)
        if (dwc3_imx->wakeup_pending) {
                dwc3_imx->wakeup_pending = false;
                if (dwc->current_dr_role == DWC3_GCTL_PRTCAP_DEVICE) {
-                       pm_runtime_mark_last_busy(dwc->dev);
                        pm_runtime_put_autosuspend(dwc->dev);
                } else {
                        /*
index 39c72cb52ce76a4bdbc94ecdf570f2da936fc00f..ce7b76d24fb27b699f449d1960abdf42d1db6e65 100644 (file)
@@ -322,7 +322,6 @@ static void dwc3_pci_resume_work(struct work_struct *work)
                return;
        }
 
-       pm_runtime_mark_last_busy(&dwc3->dev);
        pm_runtime_put_sync_autosuspend(&dwc3->dev);
 }
 #endif
index 1e28d6f50ed07ad09a7ffa43673ae129c564f5f3..0a8c47876ff944248c25ae75a8903d5e714b91ac 100644 (file)
@@ -383,7 +383,6 @@ static int __maybe_unused dwc3_xlnx_runtime_resume(struct device *dev)
 
 static int __maybe_unused dwc3_xlnx_runtime_idle(struct device *dev)
 {
-       pm_runtime_mark_last_busy(dev);
        pm_runtime_autosuspend(dev);
 
        return 0;
index 7e69944ef18a91ab51f4f8abefae7149e93eb92c..9b53daf765833228d7b5c73f6c657fa6f1739c2f 100644 (file)
@@ -2415,7 +2415,6 @@ int cdns2_gadget_resume(struct cdns2_device *pdev, bool hibernated)
 
 void cdns2_gadget_remove(struct cdns2_device *pdev)
 {
-       pm_runtime_mark_last_busy(pdev->dev);
        pm_runtime_put_autosuspend(pdev->dev);
 
        usb_del_gadget(&pdev->gadget);
index 208558cf822dc930c0e1493c68b6c0c61f96dde0..06043c7c3100616eb18a9527a599b6dfbeae7aaa 100644 (file)
@@ -670,7 +670,6 @@ static int xhci_mtk_probe(struct platform_device *pdev)
        }
 
        device_enable_async_suspend(dev);
-       pm_runtime_mark_last_busy(dev);
        pm_runtime_put_autosuspend(dev);
        pm_runtime_forbid(dev);
 
index 1e23f198a005cf05f3d3fc1ced77657e46fa8b15..31ccced5125e8035dd4cbb211136024af1b87e0a 100644 (file)
@@ -1399,7 +1399,6 @@ static void tegra_xhci_id_work(struct work_struct *work)
                }
 
                tegra_xhci_set_port_power(tegra, true, true);
-               pm_runtime_mark_last_busy(tegra->dev);
 
        } else {
                if (tegra->otg_usb3_port >= 0)
index 8e852f4b8262e6e8fcd33883be8c5696f19b9ee9..47b38dcc29925a53d37532df983ef06a6d111f4b 100644 (file)
@@ -134,7 +134,6 @@ static int apple_mfi_fc_set_property(struct power_supply *psy,
                ret = -EINVAL;
        }
 
-       pm_runtime_mark_last_busy(&mfi->udev->dev);
        pm_runtime_put_autosuspend(&mfi->udev->dev);
 
        return ret;
index 7b5a431acb56571ec9c376065a16e2f56f3a8a89..cc8a864dbd6385c2842ebd550d0e16b1baa719c3 100644 (file)
@@ -431,7 +431,6 @@ static int mtu3_probe(struct platform_device *pdev)
        }
 
        device_enable_async_suspend(dev);
-       pm_runtime_mark_last_busy(dev);
        pm_runtime_put_autosuspend(dev);
        pm_runtime_forbid(dev);
 
index c7234b2369716627cbb656e4b6c1c86b1bfc05f9..0acc62569ae5134d4c5e4b38623b5840343ac4c7 100644 (file)
@@ -2031,7 +2031,6 @@ static void musb_pm_runtime_check_session(struct musb *musb)
                if (!musb->session)
                        break;
                trace_musb_state(musb, devctl, "Allow PM on possible host mode disconnect");
-               pm_runtime_mark_last_busy(musb->controller);
                pm_runtime_put_autosuspend(musb->controller);
                musb->session = false;
                return;
@@ -2063,7 +2062,6 @@ static void musb_pm_runtime_check_session(struct musb *musb)
                                              msecs_to_jiffies(3000));
        } else {
                trace_musb_state(musb, devctl, "Allow PM with no session");
-               pm_runtime_mark_last_busy(musb->controller);
                pm_runtime_put_autosuspend(musb->controller);
        }
 
@@ -2090,7 +2088,6 @@ static void musb_irq_work(struct work_struct *data)
                sysfs_notify(&musb->controller->kobj, NULL, "mode");
        }
 
-       pm_runtime_mark_last_busy(musb->controller);
        pm_runtime_put_autosuspend(musb->controller);
 }
 
@@ -2564,7 +2561,6 @@ musb_init_controller(struct device *dev, int nIrq, void __iomem *ctrl)
        musb_init_debugfs(musb);
 
        musb->is_initialized = 1;
-       pm_runtime_mark_last_busy(musb->controller);
        pm_runtime_put_autosuspend(musb->controller);
 
        return 0;
@@ -2887,7 +2883,6 @@ static int musb_resume(struct device *dev)
                        error);
        spin_unlock_irqrestore(&musb->lock, flags);
 
-       pm_runtime_mark_last_busy(dev);
        pm_runtime_put_autosuspend(dev);
 
        return 0;
index 2d623284edf63f4fb0c81d1b3dee60569f44d8cf..5092d62c206284f1bc102544df54b57e6e9a01dc 100644 (file)
@@ -106,7 +106,6 @@ static int musb_regdump_show(struct seq_file *s, void *unused)
                }
        }
 
-       pm_runtime_mark_last_busy(musb->controller);
        pm_runtime_put_autosuspend(musb->controller);
        return 0;
 }
@@ -119,7 +118,6 @@ static int musb_test_mode_show(struct seq_file *s, void *unused)
 
        pm_runtime_get_sync(musb->controller);
        test = musb_readb(musb->mregs, MUSB_TESTMODE);
-       pm_runtime_mark_last_busy(musb->controller);
        pm_runtime_put_autosuspend(musb->controller);
 
        if (test == (MUSB_TEST_FORCE_HOST | MUSB_TEST_FORCE_FS))
@@ -216,7 +214,6 @@ static ssize_t musb_test_mode_write(struct file *file,
        musb_writeb(musb->mregs, MUSB_TESTMODE, test);
 
 ret:
-       pm_runtime_mark_last_busy(musb->controller);
        pm_runtime_put_autosuspend(musb->controller);
        return count;
 }
@@ -243,7 +240,6 @@ static int musb_softconnect_show(struct seq_file *s, void *unused)
                reg = musb_readb(musb->mregs, MUSB_DEVCTL);
                connect = reg & MUSB_DEVCTL_SESSION ? 1 : 0;
 
-               pm_runtime_mark_last_busy(musb->controller);
                pm_runtime_put_autosuspend(musb->controller);
                break;
        default:
@@ -304,7 +300,6 @@ static ssize_t musb_softconnect_write(struct file *file,
                }
        }
 
-       pm_runtime_mark_last_busy(musb->controller);
        pm_runtime_put_autosuspend(musb->controller);
        return count;
 }
index a08ce96c08d3ae1300eef8c48c9d0c3fd93a8307..e3935f18dd56c22f06a1dbcc64e8003083eae19f 100644 (file)
@@ -296,7 +296,6 @@ static void otg_timer(struct timer_list *t)
        if (err < 0)
                dev_err(dev, "%s resume work: %i\n", __func__, err);
        spin_unlock_irqrestore(&musb->lock, flags);
-       pm_runtime_mark_last_busy(dev);
        pm_runtime_put_autosuspend(dev);
 }
 
index caf4d4cd4b75b88b85aa0ca20f8f34856202c6c4..d666c4292753eeb18c7045250702de5b0ae73eed 100644 (file)
@@ -1258,7 +1258,6 @@ static int musb_gadget_queue(struct usb_ep *ep, struct usb_request *req,
 
 unlock:
        spin_unlock_irqrestore(&musb->lock, lockflags);
-       pm_runtime_mark_last_busy(musb->controller);
        pm_runtime_put_autosuspend(musb->controller);
 
        return status;
@@ -1642,7 +1641,6 @@ static void musb_gadget_work(struct work_struct *work)
        spin_lock_irqsave(&musb->lock, flags);
        musb_pullup(musb, musb->softconnect);
        spin_unlock_irqrestore(&musb->lock, flags);
-       pm_runtime_mark_last_busy(musb->controller);
        pm_runtime_put_autosuspend(musb->controller);
 }
 
@@ -1862,7 +1860,6 @@ static int musb_gadget_start(struct usb_gadget *g,
        if (musb->xceiv && musb->xceiv->last_event == USB_EVENT_ID)
                musb_platform_set_vbus(musb, 1);
 
-       pm_runtime_mark_last_busy(musb->controller);
        pm_runtime_put_autosuspend(musb->controller);
 
        return 0;
@@ -1916,7 +1913,6 @@ static int musb_gadget_stop(struct usb_gadget *g)
        usb_gadget_set_state(g, USB_STATE_NOTATTACHED);
 
        /* Force check of devctl register for PM runtime */
-       pm_runtime_mark_last_busy(musb->controller);
        pm_runtime_put_autosuspend(musb->controller);
 
        return 0;
index c35c07b7488cadda7724457f66d7fb0da5d53991..48bb9bfb22043977af0a01e7b9cf3d6329d6de1c 100644 (file)
@@ -151,7 +151,6 @@ static void omap_musb_set_mailbox(struct omap2430_glue *glue)
        default:
                dev_dbg(musb->controller, "ID float\n");
        }
-       pm_runtime_mark_last_busy(musb->controller);
        pm_runtime_put_autosuspend(musb->controller);
        atomic_notifier_call_chain(&musb->xceiv->notifier,
                        musb->xceiv->last_event, NULL);