From patchwork Tue Oct 24 11:36:19 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Tony Lindgren X-Patchwork-Id: 157394 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:ce89:0:b0:403:3b70:6f57 with SMTP id p9csp1875244vqx; Tue, 24 Oct 2023 04:36:55 -0700 (PDT) X-Google-Smtp-Source: AGHT+IHk1SHV/+4ze1rgmMmMzkPtC66XGs4SqChXTxnPiaFmUWe3HoNYfbUJXC47Tn8YVnGS/fa2 X-Received: by 2002:a17:902:ec89:b0:1c9:dff1:6ddd with SMTP id x9-20020a170902ec8900b001c9dff16dddmr11873066plg.35.1698147415148; Tue, 24 Oct 2023 04:36:55 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1698147415; cv=none; d=google.com; s=arc-20160816; b=Lu/ghnXkQqk3w8ADUvDAhzTKN+yL4F+go5kv9wQkfDOQ4kCKYbInHZ91JRx25g/Jh2 /eo8QpBwBTuqvpNE9R1UyO4CMsEkvI3eIJ9A/raFVbxWrt/2bAyLK5rUEbM+Lfknunuw fitNdlI5dmdpAjx00zsEIZKbr/uvFIsipdotUhYYAwHSmnYiye/gxYpaMtTreOzMtx0G bLuBb9JBjlNh9NYpVZUAhk/MWzuvbFCrNZxa6YQwyrm8wJMDNGhoCQe/31i/TDL6skj1 9MGwKnFGImQb1bM8qJYa8jMj4q2u14YocvZjEshPsAo8SlKepOlW8+I43R7KhES9zVx3 ztJQ== 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=XeFoXkRJiHOWBmMzq2w14KlOSSVyQP7toAsD2/3sbV0=; fh=2x0LzFDLB8pFBRtcvYfYOYSMwv5M2A8EvGEr0Lg0ag4=; b=Ro3Am14W52N2owBKtlPZMzH61TO6cecMrcnZzOvuptYaSIs/0sY24QMyiFOXdF0S22 jF6iA0K2VVb16usxhupoCMWSeIn9qTELkmV/xWVu7i5Ac5j6zgoeg+lJ1buH1CaET4+t M/3blDqNA6uVmT+j8yTHhxC9o2y2N3K/4wKWbfPVWCyXtB1iZI+3Y/2mOeTs4BSeUuAj Ewdg5rQpwz5njpi2LzBRQnn4eZPX7wc0h2yZlGWUrA5a2MYnQWQaxJ0JTwlmpciDidGy fYX5iDucWam2iQpDEbHLeRLu36f2AvAZZqOmITuNCwGfNylnR6UbgvrDAOC17aJwLjXQ 77Cg== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.33 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: from lipwig.vger.email (lipwig.vger.email. [23.128.96.33]) by mx.google.com with ESMTPS id i17-20020a17090332d100b001ca335f71bbsi8485324plr.140.2023.10.24.04.36.54 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 24 Oct 2023 04:36:55 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.33 as permitted sender) client-ip=23.128.96.33; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.33 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 lipwig.vger.email (Postfix) with ESMTP id 5921680CB17B; Tue, 24 Oct 2023 04:36:52 -0700 (PDT) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.10 at lipwig.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229578AbjJXLgn (ORCPT + 26 others); Tue, 24 Oct 2023 07:36:43 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:56102 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231241AbjJXLgl (ORCPT ); Tue, 24 Oct 2023 07:36:41 -0400 Received: from muru.com (muru.com [72.249.23.125]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id E6D8BD68; Tue, 24 Oct 2023 04:36:39 -0700 (PDT) Received: from hillo.muru.com (localhost [127.0.0.1]) by muru.com (Postfix) with ESMTP id 81D158127; Tue, 24 Oct 2023 11:36:37 +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: [RFC PATCH 2/2] serial: core: Revert checks for tx runtime PM state Date: Tue, 24 Oct 2023 14:36:19 +0300 Message-ID: <20231024113624.54364-2-tony@atomide.com> X-Mailer: git-send-email 2.42.0 In-Reply-To: <20231024113624.54364-1-tony@atomide.com> References: <20231024113624.54364-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 autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lipwig.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 (lipwig.vger.email [0.0.0.0]); Tue, 24 Oct 2023 04:36:52 -0700 (PDT) X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1780636624369944425 X-GMAIL-MSGID: 1780636624369944425 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 --- 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);