From patchwork Wed Jun 26 14:11:28 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Sergey Organov X-Patchwork-Id: 11017951 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 3775913AF for ; Wed, 26 Jun 2019 14:16:04 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 251182871A for ; Wed, 26 Jun 2019 14:16:04 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 1F1712880B; Wed, 26 Jun 2019 14:16:04 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-5.2 required=2.0 tests=BAYES_00,DKIM_ADSP_CUSTOM_MED, DKIM_SIGNED,DKIM_VALID,FREEMAIL_FROM,MAILING_LIST_MULTI,RCVD_IN_DNSWL_MED autolearn=ham version=3.3.1 Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id 7DC6E2880B for ; Wed, 26 Jun 2019 14:16:03 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20170209; h=Sender: Content-Transfer-Encoding:Content-Type:MIME-Version:Cc:List-Subscribe: List-Help:List-Post:List-Archive:List-Unsubscribe:List-Id: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=QDpAb6eLspu7RsM4IAGnIUiw+eE/0eNuKIoYIReJJPU=; b=USDGf/I6M+Pz8TYgDuevRPD61w nuvgBZ/P3oMlmI7AHWErYfzeFcCTXWDbhxSX2PlDik1ggCd+h3KmVpuunXa375kIRETsr50XPLylz dkYBxQC+8PGDuWj13teIbfy/HnmKjutCT30SBF9fOMrQZMQhdHZb4C63+bUnaRK0MbEvQumI25tZn AXfKINSboUIhIDnOaW447jNsOJ1aZeks3/izfnNvW9LXIpm0heccefeGkZGz0neNroisMK+TdwyHs hQDL5BKBi3pZzFrfFH3YczAA1J+uwLLA3BOUBaYhL+fJwpHQYWh6JGWtD9lGcBUlHvIGjMPsBMq9N 6TQVoQyQ==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.92 #3 (Red Hat Linux)) id 1hg8iK-00069Q-GM; Wed, 26 Jun 2019 14:15:56 +0000 Received: from mail-lj1-x244.google.com ([2a00:1450:4864:20::244]) by bombadil.infradead.org with esmtps (Exim 4.92 #3 (Red Hat Linux)) id 1hg8gm-0003xz-I5 for linux-arm-kernel@lists.infradead.org; Wed, 26 Jun 2019 14:14:22 +0000 Received: by mail-lj1-x244.google.com with SMTP id 205so2373618ljj.8 for ; Wed, 26 Jun 2019 07:14:18 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=SjpXSg531ioWOBzpBIFjjzIi5yRvk9QMHcPgjilDAr0=; b=qca4raonl1jkAymrg6nNDfK2OxZwaHqAPzBOVKKzmmIaGVOgkn9U5Sug8izqRqiEgq p9i945fgppbhD/Wxh3QoI+0pABdNgTcyf1KgEVPK4ZfK1k1DDgORdOn0QGmhVldkYpqE 6xF7IvU8nPR8J2G7ZKBEncmu754DR6j1HNDntCiDM8TBaYuxCC1/1MeIKkknUmdHyMK7 ifkg433l8teKUsPih39z12s1yxtg69E1kCzXyp//aXxCFI854XTxAEV+3M5axsFeMyS1 ngyjdMVS7qCt9L7eBE/yGIo0wUQxtwFCqos7DKXUQHd+a7YRPMWqf6DKBOSiTFil0L93 OsIw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=SjpXSg531ioWOBzpBIFjjzIi5yRvk9QMHcPgjilDAr0=; b=ZEMTclTNBqN+Wc9o4bX2QinFdqXdCfbiyu2r90x4mjIpvRAveGRAsMCQY3OSByEJ+t gQnm0zRLGdBStSW5O7UYwT3U6R2B5HFPH4IhOLYeCGC7isdtjPlINVg74K6zq8L1oxw3 DXgWbXIlH2fST3sdmcclbom7QoSbJtWy90Ex774wfrDSCfKbj8xQh7YY6tI7Tcc4qj4V 0HiBvl+E6pD87aIa3OAqxFjzgjPTOeElcrwRIBQF5JwTyuGh+M990BRBvPOuvHTfx9vT nEynOuqpx8g09k5EqSunpedl8S1QY0edwBBuNaDVS3F1m5t6CbUdfJAaNmFZ3Y/Aug92 EQsw== X-Gm-Message-State: APjAAAULC9mXXjERB8ru7pXb0u8sJL4fSrocy6PaUvfBtuHvMlE5XCQm jeHmXBUYi/uoP2ZhYupC6vU= X-Google-Smtp-Source: APXvYqw5/oAtAzvXc7HUCNpUYYoZ2KlQOF8a5I/VNuxYuw3AuZvADuJi9KXokLYHddmUnp8SlU8Vgg== X-Received: by 2002:a2e:8155:: with SMTP id t21mr3108879ljg.80.1561558456870; Wed, 26 Jun 2019 07:14:16 -0700 (PDT) Received: from osv.localdomain ([89.175.180.246]) by smtp.gmail.com with ESMTPSA id 25sm2863825ljn.62.2019.06.26.07.14.15 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Wed, 26 Jun 2019 07:14:16 -0700 (PDT) From: Sergey Organov To: Sascha Hauer Subject: [PATCH v2 2/7] serial: imx: set_termios(): factor-out 'ucr2' initial value Date: Wed, 26 Jun 2019 17:11:28 +0300 Message-Id: <1561558293-7683-3-git-send-email-sorganov@gmail.com> X-Mailer: git-send-email 2.1.4 In-Reply-To: <1561558293-7683-1-git-send-email-sorganov@gmail.com> References: <20190614072801.3187-1-s.hauer@pengutronix.de> <1561558293-7683-1-git-send-email-sorganov@gmail.com> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20190626_071420_629304_6E8265E2 X-CRM114-Status: GOOD ( 10.96 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Pengutronix Kernel Team , NXP Linux Team , linux-arm-kernel@lists.infradead.org, linux-serial@vger.kernel.org, =?utf-8?q?Uwe_Kleine-K=C3=B6nig?= MIME-Version: 1.0 Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org X-Virus-Scanned: ClamAV using ClamSMTP Set common bits in a separate statement to make initialization explicit and not repeat the common part. Reviewed-by: Sascha Hauer Tested-by: Sascha Hauer Signed-off-by: Sergey Organov Reviewed-by: Uwe Kleine-König --- drivers/tty/serial/imx.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/drivers/tty/serial/imx.c b/drivers/tty/serial/imx.c index 1055124..87802fd 100644 --- a/drivers/tty/serial/imx.c +++ b/drivers/tty/serial/imx.c @@ -1563,10 +1563,9 @@ imx_uart_set_termios(struct uart_port *port, struct ktermios *termios, spin_lock_irqsave(&sport->port.lock, flags); + ucr2 = UCR2_SRST | UCR2_IRTS; if ((termios->c_cflag & CSIZE) == CS8) - ucr2 = UCR2_WS | UCR2_SRST | UCR2_IRTS; - else - ucr2 = UCR2_SRST | UCR2_IRTS; + ucr2 |= UCR2_WS; if (termios->c_cflag & CRTSCTS) { if (sport->have_rtscts) {