From patchwork Mon Nov 13 08:07:53 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Tony Lindgren X-Patchwork-Id: 164360 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:b909:0:b0:403:3b70:6f57 with SMTP id t9csp1060543vqg; Mon, 13 Nov 2023 00:08:42 -0800 (PST) X-Google-Smtp-Source: AGHT+IFHPqLRbm8U8+xXPx86LxKS17MJCXEePFyPjCSyQV8c7O0iJX0y/aI2+4j8lTRWcRiPxt2n X-Received: by 2002:a05:6808:144f:b0:3ac:a522:5461 with SMTP id x15-20020a056808144f00b003aca5225461mr9186305oiv.36.1699862921816; Mon, 13 Nov 2023 00:08:41 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1699862921; cv=none; d=google.com; s=arc-20160816; b=OQpMcOZ9pocDZBqdwFxd8f1Ld/FOKp+iBWMQ0qSsZSa2WBoT9qcUXodAWnl72Bu9/o g2qRKp+AyI5xoW2QXlNM10NbQNztRaQJHr7VPJFEnvZUA4VQMBUjJaTcE0vOjC/nM0L2 tPQoBmfljhFsnUK7nHbYkRmOOtVDAGZ+tsMJoSWabf1IcikikFFYz+lmwWOvmKYev+Fa vXbFaNzenPsMwtYFdDLsRLZFhEKmd9lH4xxJ94UuxVBb97QmYsHp0H5g2CMfCktqH9Qe cS6R2qLbk760uDKHjh5bSowwCJa0/JVElBir1Kkr2bSzUOK3/Du8Fc1bzGY3cHYdfl9M 9jjQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from; bh=DcAR0jxfqv9YJzYaTSt7kgLZhSQOK4j2dfIkEGTl2Z4=; fh=2x0LzFDLB8pFBRtcvYfYOYSMwv5M2A8EvGEr0Lg0ag4=; b=PeJ/36FC90N1lSHLrwzepGzTKRSA8Q/Pjq9a2kg0WOsZz6JAHyOPsJhGwUKvpW3Z5L 4FUCPcOHqA3/EBYR5mwNI3HEsLDkwx2lVnyqQxvc9EcNRGbsF/reMtRhnh+4QhqM1gdC CU+xCso8jfmu2vAx60FTOFb3SfRJbNqEXgZ808R/zhIXNDB3oTw8gcqtvQjZ95ufnuF2 AQC/ONuftFcKh0wGqCSLTMIkTWUEQYzR1ns8/U6R9HWdlAMkFU/WSl6ZOmoWc+puwXa8 BxHbah5/C3zWP3vur32VJsTBa6Bd/d3m9hkVw+LmGEj+cxfEFAPGSKCIn7MpYykgaTb9 YwqA== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.38 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: from fry.vger.email (fry.vger.email. [23.128.96.38]) by mx.google.com with ESMTPS id cf14-20020a056a02084e00b005bce8cfb592si5708789pgb.245.2023.11.13.00.08.41 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 13 Nov 2023 00:08:41 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.38 as permitted sender) client-ip=23.128.96.38; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.38 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by fry.vger.email (Postfix) with ESMTP id C0626809AFCB; Mon, 13 Nov 2023 00:08:39 -0800 (PST) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.11 at fry.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233178AbjKMIIU (ORCPT + 29 others); Mon, 13 Nov 2023 03:08:20 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:55456 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229817AbjKMIIS (ORCPT ); Mon, 13 Nov 2023 03:08:18 -0500 Received: from muru.com (muru.com [72.249.23.125]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id D19D410F5; Mon, 13 Nov 2023 00:08:09 -0800 (PST) Received: from hillo.muru.com (localhost [127.0.0.1]) by muru.com (Postfix) with ESMTP id 33F3E816E; Mon, 13 Nov 2023 08:08:07 +0000 (UTC) From: Tony Lindgren To: Greg Kroah-Hartman , Jiri Slaby Cc: Andy Shevchenko , Dhruva Gole , =?utf-8?q?Ilpo_J=C3=A4rvinen?= , John Ogness , Johan Hovold , Sebastian Andrzej Siewior , Vignesh Raghavendra , linux-kernel@vger.kernel.org, linux-serial@vger.kernel.org, Maximilian Luz , Rob Herring Subject: [PATCH v2 2/2] serial: core: Revert checks for tx runtime PM state Date: Mon, 13 Nov 2023 10:07:53 +0200 Message-ID: <20231113080758.30346-2-tony@atomide.com> X-Mailer: git-send-email 2.42.1 In-Reply-To: <20231113080758.30346-1-tony@atomide.com> References: <20231113080758.30346-1-tony@atomide.com> MIME-Version: 1.0 X-Spam-Status: No, score=-0.8 required=5.0 tests=HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on fry.vger.email Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.6.4 (fry.vger.email [0.0.0.0]); Mon, 13 Nov 2023 00:08:39 -0800 (PST) X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1782435463385760471 X-GMAIL-MSGID: 1782435463385760471 This reverts commit 81a61051e0ce5fd7e09225c0d5985da08c7954a7. With tty and serdev controller moved to be children of the serial core port device, runtime PM usage count of the serdev controller now propagates to the serial hardware controller parent device as expected. Cc: Maximilian Luz Cc: Rob Herring Signed-off-by: Tony Lindgren Reviewed-by: Andy Shevchenko --- drivers/tty/serial/serial_core.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/tty/serial/serial_core.c b/drivers/tty/serial/serial_core.c --- a/drivers/tty/serial/serial_core.c +++ b/drivers/tty/serial/serial_core.c @@ -156,7 +156,7 @@ static void __uart_start(struct uart_state *state) * enabled, serial_port_runtime_resume() calls start_tx() again * after enabling the device. */ - if (!pm_runtime_enabled(port->dev) || pm_runtime_active(port->dev)) + if (pm_runtime_active(&port_dev->dev)) port->ops->start_tx(port); pm_runtime_mark_last_busy(&port_dev->dev); pm_runtime_put_autosuspend(&port_dev->dev);