From patchwork Mon Jul 31 02:33:23 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Surong Pang X-Patchwork-Id: 13333587 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 70BB7EB64DD for ; Mon, 31 Jul 2023 02:34:37 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229608AbjGaCeg (ORCPT ); Sun, 30 Jul 2023 22:34:36 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:38012 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229541AbjGaCef (ORCPT ); Sun, 30 Jul 2023 22:34:35 -0400 Received: from SHSQR01.spreadtrum.com (unknown [222.66.158.135]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 06BDB12E; Sun, 30 Jul 2023 19:34:33 -0700 (PDT) Received: from dlp.unisoc.com ([10.29.3.86]) by SHSQR01.spreadtrum.com with ESMTP id 36V2XRAC057518; Mon, 31 Jul 2023 10:33:27 +0800 (+08) (envelope-from surong.pang@unisoc.com) Received: from SHDLP.spreadtrum.com (shmbx05.spreadtrum.com [10.29.1.56]) by dlp.unisoc.com (SkyGuard) with ESMTPS id 4RDj1K0mJxz2NcNVr; Mon, 31 Jul 2023 10:31:49 +0800 (CST) Received: from zeshkernups01.spreadtrum.com (10.29.55.99) by shmbx05.spreadtrum.com (10.29.1.56) with Microsoft SMTP Server (TLS) id 15.0.1497.23; Mon, 31 Jul 2023 10:33:26 +0800 From: Surong Pang To: , , , , CC: , , , , Subject: [PATCH] usb: dwc3: gadget: Let pm runtime get/put paired Date: Mon, 31 Jul 2023 10:33:23 +0800 Message-ID: <20230731023323.16046-1-surong.pang@unisoc.com> X-Mailer: git-send-email 2.17.1 MIME-Version: 1.0 X-Originating-IP: [10.29.55.99] X-ClientProxiedBy: SHCAS03.spreadtrum.com (10.0.1.207) To shmbx05.spreadtrum.com (10.29.1.56) X-MAIL: SHSQR01.spreadtrum.com 36V2XRAC057518 Precedence: bulk List-ID: X-Mailing-List: linux-usb@vger.kernel.org Pm_runtime_get is called when setting pending_events to true. Pm_runtime_put is needed for pairing with pm_runtime_get. Fixes: fc8bb91bc83ef ("usb: dwc3: implement runtime PM") Signed-off-by: Surong Pang --- drivers/usb/dwc3/gadget.c | 1 + 1 file changed, 1 insertion(+) diff --git a/drivers/usb/dwc3/gadget.c b/drivers/usb/dwc3/gadget.c index 5fd067151fbf..9c835c5f9928 100644 --- a/drivers/usb/dwc3/gadget.c +++ b/drivers/usb/dwc3/gadget.c @@ -4720,5 +4720,6 @@ void dwc3_gadget_process_pending_events(struct dwc3 *dwc) dwc3_interrupt(dwc->irq_gadget, dwc->ev_buf); dwc->pending_events = false; enable_irq(dwc->irq_gadget); + pm_runtime_put(dwc->dev); } }