From patchwork Sun Jul 10 16:44:36 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Lino Sanfilippo X-Patchwork-Id: 12912574 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 bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 12651C433EF for ; Sun, 10 Jul 2022 16:46:45 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To: Message-Id:Date:Subject:Cc:To:From:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=3J7MlngULEfB4r5UPfYTDeC9sa8qtdRCfwXMVbzJlMM=; b=gQDkCmlblzZABI 0hvxDvW7GjAWKYueTw5UX550a2yUgZeeR9AZNMNNHIoFMxRnyZiHgQWJ6u4T/TO/OZ/Zo7aQlgwIU ukd0ZD39gtMwIlAyajto8uvZ/L9yzMBROMMK+PrLrLkgu80hYyKLyPHwgRH2SMQDOStkssKjEIime pJFG7MHj+gtbT3Nd5hoKYzuUlFrVDAUTfKodXn6Ck7l4DytWzvzxMOIhybvstcJ6W7aamH/bIOWaO ETbwpW6vkpeWjulATwO8JUa+diWEPYsHEXh/gIoCfRClLjsMV3gdQB+mWK3thWGehfy3WHLVhYUpx o07TwL7bphXKcHLOJpHQ==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1oAa3l-00CXNP-TV; Sun, 10 Jul 2022 16:45:30 +0000 Received: from mout.gmx.net ([212.227.17.20]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1oAa3P-00CXCY-Fb for linux-arm-kernel@lists.infradead.org; Sun, 10 Jul 2022 16:45:11 +0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=gmx.net; s=badeba3b8450; t=1657471496; bh=ZCtUUJ2Kv6ZjMvVyjn9DfppbcpxqyAsK7G92RHDx1TY=; h=X-UI-Sender-Class:From:To:Cc:Subject:Date:In-Reply-To:References; b=JGGkWd/jM0pG0LWxjd7k9w7t5glUGXZzlhWE9RRWZZyaFgLTnxEDEP8vU+2dh3MHf ZdmE1R1joGkfVkyy2argi/BCJD9nHxat/2pquIoNGhq/f1/V3zhXOvJDefFMSi79sZ WNQnHNW53ZheDKXVac4lpxPUyY1iRAmXJvKBYNcU= X-UI-Sender-Class: 01bb95c1-4bf8-414a-932a-4f6e2808ef9c Received: from localhost.localdomain ([46.223.3.243]) by mail.gmx.net (mrgmx104 [212.227.17.168]) with ESMTPSA (Nemesis) id 1MVNB1-1o2A9Q49I7-00SQZn; Sun, 10 Jul 2022 18:44:56 +0200 From: Lino Sanfilippo To: gregkh@linuxfoundation.org, jirislaby@kernel.org Cc: ilpo.jarvinen@linux.intel.com, robh+dt@kernel.org, krzysztof.kozlowski+dt@linaro.org, andriy.shevchenko@linux.intel.com, vz@mleia.com, linux-arm-kernel@lists.infradead.org, devicetree@vger.kernel.org, linux-serial@vger.kernel.org, linux-kernel@vger.kernel.org, lukas@wunner.de, p.rosenberger@kunbus.com, Lino Sanfilippo Subject: [PATCH v4 2/8] serial: ar933x: Remove superfluous code in ar933x_config_rs485() Date: Sun, 10 Jul 2022 18:44:36 +0200 Message-Id: <20220710164442.2958979-3-LinoSanfilippo@gmx.de> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20220710164442.2958979-1-LinoSanfilippo@gmx.de> References: <20220710164442.2958979-1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riRuQPNmE/qgRilQMN0yVXHnwXX3RdpFvAdQHTE9s5LYPxIaVamb njwuI2xjsuWrVLN/f30uE8ebjoWYX+6lGdTvbYb8Rgfz4KbpnpfJO9BCVheeodlNo8VYzWoM4 E3O5498CjdmUvbWwkuo4IS/jfGX/z0CsiQ1IlvY7GOuN77xqIJd+wKrC4GCGmhe4XZSDW81S4 dWXC0v35YUA+0dxMGB875LZP/du92xWEer9Z5OYGixv8ya1v5eMGMTQq4NkfJDxXSGqiF80rX fPV3K8/F33g5rhjbLxdyjqTQOd2rxqVdVnlpOz9C7O0hyyySR1tLwtMwz5kGFFOvm3/8MFbVW dNQ/hKHHmZWWwPY+eSw3kGiizegQ+nBikhchkziCuZKwYIisNxCl+zjeA== X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20220710_094508_104004_C1371D04 X-CRM114-Status: GOOD ( 12.66 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org From: Lino Sanfilippo In ar933x_config_rs485() the check for the RTS GPIO is not needed since in case the GPIO is not available at driver init ar933x_no_rs485 is assigned to port->rs485_supported and this function is never called. So remove the check. Also in uart_set_rs485_config() the serial core already assigns the passed serial_rs485 struct to the uart port. So remove the assignment in the drivers rs485_config() function to avoid redundancy. Signed-off-by: Lino Sanfilippo --- drivers/tty/serial/ar933x_uart.c | 9 --------- 1 file changed, 9 deletions(-) diff --git a/drivers/tty/serial/ar933x_uart.c b/drivers/tty/serial/ar933x_uart.c index f7b4638d69e5..32caeac12985 100644 --- a/drivers/tty/serial/ar933x_uart.c +++ b/drivers/tty/serial/ar933x_uart.c @@ -583,15 +583,6 @@ static const struct uart_ops ar933x_uart_ops = { static int ar933x_config_rs485(struct uart_port *port, struct ktermios *termios, struct serial_rs485 *rs485conf) { - struct ar933x_uart_port *up = - container_of(port, struct ar933x_uart_port, port); - - if ((rs485conf->flags & SER_RS485_ENABLED) && - !up->rts_gpiod) { - dev_err(port->dev, "RS485 needs rts-gpio\n"); - return 1; - } - port->rs485 = *rs485conf; return 0; }