Received: by 2002:a05:6a10:206:0:0:0:0 with SMTP id 6csp4516251pxj; Wed, 12 May 2021 07:18:34 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzPOLE90x+VX8HCych5z9X6HI/pP3Qxqk2pJKvfVhBnUd9hdmiY55g2LiZYzvY+sxGsfCxM X-Received: by 2002:a50:fd13:: with SMTP id i19mr1607518eds.386.1620829114538; Wed, 12 May 2021 07:18:34 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1620829114; cv=none; d=google.com; s=arc-20160816; b=chab1FV4R73rScsEWg0Yzg2biw5GRKwoXS8yNqnGY9RmrARo7zLRe4othW+6iRHq3t LtGWSspQV8E0Eyke0r84nPxIL/wTH7MFJsBla7RKJbaaX4+1yQ+p+jhN6oB5pCM3L0Et D/4RVhDj2FhA6F+sqtxo1AilGYffVMMakrx5zAsfyq5/UgApNk6aKfuFwqYshbVrODhF axaUaGQb1COH+akJABCM4X//B1bEuW41ZlmlpFEip5JkzFSzTigrh8g04xkQF1G2dWaN iZAtjPVTLngm1MzihJ43RAshGtu6T+r6ZdTwO3T2GT6THMR9VnCNaqdx+fiLUhQ7ZxEt xAlA== 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 :dkim-signature; bh=aD8CNHQQPQk+RYYnZax5l7oYjvuKmQC8FcB0mIvAWQs=; b=yDM3VxKzMvillYnk1J4d3BtOLovz+PZY9s6AZWuohUZf7TklYngZ6rxmit83HDJpTj MoMDanRUm5UB0+jzktdK4C/XLfmT2N0fEsV+tHuDHnu2PqGRcyWWl+Q8qPk0OYGqtE6g 2U1ZzCSP15x6ma31fRyk8+dzyIpZNf4KTgXyc7t2Ch0/8F+lUvyjVWZXUnWJxI5TN5vC +LFZOlr/R3HUArWo11+9ditouqVjhtzOQrhv7DgMoGz4PwlS6z5rrK4k4LTQ6xNWYomX uX1+zSomith7fn+aUgKB0ojG1n2zHiT1IXLUtCBC/Erc2YUHioHm6vn1zCX/nZP0gZO7 XGKw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@walle.cc header.s=mail2016061301 header.b=umKFCDCC; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id bh7si31623ejb.383.2021.05.12.07.18.08; Wed, 12 May 2021 07:18:34 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@walle.cc header.s=mail2016061301 header.b=umKFCDCC; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230338AbhELOPP (ORCPT + 99 others); Wed, 12 May 2021 10:15:15 -0400 Received: from ssl.serverraum.org ([176.9.125.105]:59523 "EHLO ssl.serverraum.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231414AbhELOOR (ORCPT ); Wed, 12 May 2021 10:14:17 -0400 Received: from mwalle01.fritz.box (unknown [IPv6:2a02:810c:c200:2e91:fa59:71ff:fe9b:b851]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange ECDHE (P-384) server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by ssl.serverraum.org (Postfix) with ESMTPSA id D17C42226D; Wed, 12 May 2021 16:13:07 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=walle.cc; s=mail2016061301; t=1620828788; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=aD8CNHQQPQk+RYYnZax5l7oYjvuKmQC8FcB0mIvAWQs=; b=umKFCDCCuRwm4ZZiCCZeQjq6Plr263a9/5eQLPJYCRNWVlKq5ikC6YHouIXK74Fssx5AIH 7HbiN9Ry/ZDwMB5sKvqHH0tkKqe5indIrik1aHhtE4Yzdmd9dLMeYmhH7D/Rvwxc810jmw ZkpXxuQmRR6JgY+To8HNNgETTrz7m40= From: Michael Walle To: linux-serial@vger.kernel.org, linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , Jiri Slaby , Angelo Dureghello , Johan Hovold , Philippe Schenker , Michael Walle Subject: [PATCH v2 6/9] serial: fsl_lpuart: remove RTSCTS handling from get_mctrl() Date: Wed, 12 May 2021 16:12:52 +0200 Message-Id: <20210512141255.18277-7-michael@walle.cc> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20210512141255.18277-1-michael@walle.cc> References: <20210512141255.18277-1-michael@walle.cc> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org The wrong code in set_mctrl() was already removed in commit 2b30efe2e88a ("tty: serial: lpuart: Remove unnecessary code from set_mctrl"), but the code in get_mctrl() wasn't removed. It will not return the state of the RTS or CTS line but whether automatic flow control is enabled, which is wrong for the get_mctrl(). Thus remove it. Fixes: 2b30efe2e88a ("tty: serial: lpuart: Remove unnecessary code from set_mctrl") Signed-off-by: Michael Walle --- drivers/tty/serial/fsl_lpuart.c | 12 +----------- 1 file changed, 1 insertion(+), 11 deletions(-) diff --git a/drivers/tty/serial/fsl_lpuart.c b/drivers/tty/serial/fsl_lpuart.c index c76bdb855ba9..5b32d48bee56 100644 --- a/drivers/tty/serial/fsl_lpuart.c +++ b/drivers/tty/serial/fsl_lpuart.c @@ -1418,17 +1418,7 @@ static unsigned int lpuart_get_mctrl(struct uart_port *port) static unsigned int lpuart32_get_mctrl(struct uart_port *port) { - unsigned int temp = 0; - unsigned long reg; - - reg = lpuart32_read(port, UARTMODIR); - if (reg & UARTMODIR_TXCTSE) - temp |= TIOCM_CTS; - - if (reg & UARTMODIR_RXRTSE) - temp |= TIOCM_RTS; - - return temp; + return 0; } static void lpuart_set_mctrl(struct uart_port *port, unsigned int mctrl) -- 2.20.1