From patchwork Tue Aug 1 01:15:48 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Surong Pang X-Patchwork-Id: 709131 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 E4D78C001DF for ; Tue, 1 Aug 2023 01:16:38 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231310AbjHABQh (ORCPT ); Mon, 31 Jul 2023 21:16:37 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:60172 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229661AbjHABQh (ORCPT ); Mon, 31 Jul 2023 21:16:37 -0400 Received: from SHSQR01.spreadtrum.com (mx1.unisoc.com [222.66.158.135]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 925EA10E3; Mon, 31 Jul 2023 18:16:35 -0700 (PDT) Received: from dlp.unisoc.com ([10.29.3.86]) by SHSQR01.spreadtrum.com with ESMTP id 3711Fq3p009236; Tue, 1 Aug 2023 09:15:52 +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 4RFHFJ2Y4Fz2K1r9S; Tue, 1 Aug 2023 09:14:12 +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; Tue, 1 Aug 2023 09:15:51 +0800 From: Surong Pang To: , , , , CC: , , , , Subject: [PATCH V2] usb: dwc3: gadget: Let pm runtime get/put paired Date: Tue, 1 Aug 2023 09:15:48 +0800 Message-ID: <20230801011548.30232-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 3711Fq3p009236 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: fc8bb91bc83e ("usb: dwc3: implement runtime PM") Signed-off-by: Surong Pang --- V2: add Fixes tag, fix Fixes tag --- 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); } }