From patchwork Sun Feb 13 22:27:37 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Lino Sanfilippo X-Patchwork-Id: 12744713 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 B524EC433EF for ; Sun, 13 Feb 2022 22:31:12 +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:Cc:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To: Message-Id:Date:Subject:To:From:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=4md2FxR856fFTGM2BsWTBw3vlqCw01rnEXKSwemkqz8=; b=G6iqy8JP/YJEOK lfTtVlRGwMq1a9DSGs+tRYbsWKhZE/1hW+iYYbu60RbKKV+/Gqt0jTA30kW7wVJPhFlxDjWhhkT3b 6uchMcOdZ+pjR1wTUp5hkbXlb0C7TTCe8D+xVjzjHy/I7A6LmDToHcNHZHnKU08Q4xQV8B+gLVid8 jtfkLdTHw5U2f9QqLQYMMyGnwPGrDRIthRViPKIBcVBSZSxtuNfLQ9xVAtrXD7wrU98eqs1ZRFgn3 n5GHECil1zgLiHQzW874Vr7JMgNQnqkzYxmHoqL4N4cRcpAYpgFumoyvqi4Lb/g+6tkZBzebzIFMo OeBtCAsfTehHUPT0EFKA==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1nJNNM-00Cd4H-Dh; Sun, 13 Feb 2022 22:29:48 +0000 Received: from mout.gmx.net ([212.227.17.21]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1nJNM1-00CccO-De for linux-arm-kernel@lists.infradead.org; Sun, 13 Feb 2022 22:28:27 +0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=gmx.net; s=badeba3b8450; t=1644791292; bh=WBgs4UsljChJvlnfHo4GVoBnICbWqNN2tqDkgEeXK8E=; h=X-UI-Sender-Class:From:To:Cc:Subject:Date:In-Reply-To:References; b=CwqT8j/XAyjFTenc5EWadJ9L5zmGbowtXcDGjm61u5A4NViTeDJQB9C18zzKcgfor NV+2fjqSdYHD2+D1ciHgMo8jMswyMluyVxfp/6gkP3i41BDsDPAFsqLVKCPTa4jngS lvAAfGK3psRu4EEryVzOA192Z0M885REfOqtiOkk= X-UI-Sender-Class: 01bb95c1-4bf8-414a-932a-4f6e2808ef9c Received: from Venus.fritz.box ([149.172.237.68]) by mail.gmx.net (mrgmx105 [212.227.17.168]) with ESMTPSA (Nemesis) id 1MGQj7-1nVFpu35HZ-00GonE; Sun, 13 Feb 2022 23:28:11 +0100 From: Lino Sanfilippo To: gregkh@linuxfoundation.org, jirislaby@kernel.org Subject: [PATCH 9/9] serial: atmel: remove redundant assignment in rs485_config Date: Sun, 13 Feb 2022 23:27:37 +0100 Message-Id: <20220213222737.15709-10-LinoSanfilippo@gmx.de> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20220213222737.15709-1-LinoSanfilippo@gmx.de> References: <20220213222737.15709-1-LinoSanfilippo@gmx.de> MIME-Version: 1.0 X-Provags-ID: V03:K1:Q3ZlTb7isrIm8pDj4u1NbzVTiR5ZqKFpbyFVf3Sdoi4eXu3Ta8z oYr8DGswb8CiESXcXRkinbjAqcyDZxNc8JafBdlTupttlUD+Z9NxWNASfbGJhOPYqeE5I6g ZvCF/t1Zd866PwCgY+foXoupJw53+0IHnS3uR1I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uG++vj0/igLW4ipwhNi29OJkLg0+vGyXq2eQKNU5vYogYnMY1NFUJkB6cfPsPxTKNm/ mb8L+T8L135tc9YFmXouLB9wcMgFC7LZe9eLSbatJ8gVt4U7TYLz6AKBqmM34VRfQC8hJ8Vd8 bBOnRd9txaJJSA= X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20220213_142825_801462_E70A0E44 X-CRM114-Status: GOOD ( 11.02 ) 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: , Cc: linux-arm-kernel@lists.infradead.org, alexandre.belloni@bootlin.com, mcoquelin.stm32@gmail.com, Lino Sanfilippo , richard.genoud@gmail.com, festevam@gmail.com, s.hauer@pengutronix.de, linux@armlinux.org.uk, alexandre.torgue@foss.st.com, ludovic.desroches@microchip.com, lukas@wunner.de, linux-imx@nxp.com, kernel@pengutronix.de, linux-serial@vger.kernel.org, shawnguo@kernel.org, linux-stm32@st-md-mailman.stormreply.com, linux-kernel@vger.kernel.org Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org When RS485 is configured by userspace the serial core already assigns the passed configuration to the uart port. So remove the assignment from the drivers rs485_config function to avoid redundancy. Signed-off-by: Lino Sanfilippo --- drivers/tty/serial/atmel_serial.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/drivers/tty/serial/atmel_serial.c b/drivers/tty/serial/atmel_serial.c index 2d09a89974a2..2ab589a3d86c 100644 --- a/drivers/tty/serial/atmel_serial.c +++ b/drivers/tty/serial/atmel_serial.c @@ -299,11 +299,9 @@ static int atmel_config_rs485(struct uart_port *port, /* Resetting serial mode to RS232 (0x0) */ mode &= ~ATMEL_US_USMODE; - port->rs485 = *rs485conf; - if (rs485conf->flags & SER_RS485_ENABLED) { dev_dbg(port->dev, "Setting UART to RS485\n"); - if (port->rs485.flags & SER_RS485_RX_DURING_TX) + if (rs485conf->flags & SER_RS485_RX_DURING_TX) atmel_port->tx_done_mask = ATMEL_US_TXRDY; else atmel_port->tx_done_mask = ATMEL_US_TXEMPTY;