From patchwork Thu Jul 4 13:00:24 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Sergey Organov X-Patchwork-Id: 11031463 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 3B8F014C0 for ; Thu, 4 Jul 2019 13:01:42 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 2AC9328751 for ; Thu, 4 Jul 2019 13:01:42 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 1E62D28985; Thu, 4 Jul 2019 13:01:42 +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 AD56228751 for ; Thu, 4 Jul 2019 13:01:41 +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: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=YA30sIiNvmSWGtRqBa/PSujN7iYxEIV43ugThvZYHAI=; b=TAJnVXGAum6PTM Iqxfmu0rLLv1/iycAwYt9anHX1/Jdstk55msm9iP8IF0V/+Hm52JJqRcE9JktrHA4Ye79NTqBpccg DZ6XaTaG4DylqTNb4jOQ58FkMGH1ff/GgDQZcfW5QpGhhwrxCa/CDfsGTNNG2PEnJ2lDBwOxsfkAc 2P0ySk2jma8Kd6vgPTsaXJq1vlBenj+M6mabS8w+tnoEID1fibH8BmMYHAxTWmTOhP4uITC47wljb r31ftY4nUP8V0G8oYaI2/Ln0vXpqokB6XmKAnepXt+gqJI0T8uPJw4/ZL1Wp8UwB5Wo/fXgAy0c7W y0akhiaHShFf5Nh/xFVg==; 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 1hj1Mr-0000bJ-A3; Thu, 04 Jul 2019 13:01:41 +0000 Received: from mail-lj1-x243.google.com ([2a00:1450:4864:20::243]) by bombadil.infradead.org with esmtps (Exim 4.92 #3 (Red Hat Linux)) id 1hj1MF-0008RV-Rt for linux-arm-kernel@lists.infradead.org; Thu, 04 Jul 2019 13:01:05 +0000 Received: by mail-lj1-x243.google.com with SMTP id a21so6102449ljh.7 for ; Thu, 04 Jul 2019 06:01:03 -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 :mime-version:content-transfer-encoding; bh=GovB0KsV809AJW6tOWDxmHhyRG51oTvazg+HECC24X8=; b=vEPEzke0valyfsuQGRkaINfMgvEaL34LSMeazDtcXBSYIsCUjHGDkIqdV4AqVexD0i F/fHwh6MgjNiSgtDccaDE+5JLSt9ln98xz4GiS83kd3KE0njPccfsRa7fEUM2jJLkvFt p96cFAXbhspaBGyfBp8mKKOLQHx4uyo5AdFw3WwheZGg3LFIeXfH2zdactpZ0v6r4WNN 8CsLtStxKemadRcE4jf8tBU4pnVXBb8VYSXRWtvtCYMB8RpnyQ4WpN28rNZqn8Bsd+AS Q+KWDdp6uiKbsmPTnEBBcvlkhi6bJKtLyVJ7GYMtsLTSwObZefpsnCsUsIpXUqHJxJdT GvGA== 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:mime-version:content-transfer-encoding; bh=GovB0KsV809AJW6tOWDxmHhyRG51oTvazg+HECC24X8=; b=RXEH9ebgQysyRRu0iLZa+IewGCs0dZhmNilQftkWP50KLNcwA9MQ6iJNuyzqpUXL6l YdX0TsPkWa+GR7ORph6JB74B1h1cNMWuD4eZkxYv/sakNelQpDEooO6PTdFrlyZBeAKJ 5I5h8etGRWMeO9PKf5q96/6cEfyLmRRHjd76UdnGwO6cWrgNcbWxGSUx8fHuJbFyBD2A TslKmrsLR2unbgfLGNSyODmsV998QsQIoNqHpFau41Ob/Ecv6hw91FNQwlEZ7dD+OYdM SGzCR/7gW9mQkAmml7rHeYQSHq5tLqDzr4jF0oKr1uDrMpxEZ5n5q0H4KVrseSfOzJhh KV6w== X-Gm-Message-State: APjAAAU5isHz6p2RN5gvLaVq+55nrrbgCZ5gyxYdET+hN/4Pn8jM2PZN SrqcOkxKNDRU+DrYxUirfRw= X-Google-Smtp-Source: APXvYqwJ2WjaNtVJPAJY+EIZRKqqbDSgCqxD35lCya0AJ5Yf6vXOpOTzZ3tP361M9YOHNH7dyQnfgQ== X-Received: by 2002:a2e:5d46:: with SMTP id r67mr23597540ljb.187.1562245262585; Thu, 04 Jul 2019 06:01:02 -0700 (PDT) Received: from osv.localdomain ([89.175.180.246]) by smtp.gmail.com with ESMTPSA id h1sm485914lfj.21.2019.07.04.06.01.00 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Thu, 04 Jul 2019 06:01:01 -0700 (PDT) From: Sergey Organov To: linux-serial@vger.kernel.org Subject: [PATCH v3 2/7] serial: imx: set_termios(): factor-out 'ucr2' initial value Date: Thu, 4 Jul 2019 16:00:24 +0300 Message-Id: <1562245229-709-3-git-send-email-sorganov@gmail.com> X-Mailer: git-send-email 2.1.4 In-Reply-To: <1562245229-709-1-git-send-email-sorganov@gmail.com> References: <20190614072801.3187-1-s.hauer@pengutronix.de> <1562245229-709-1-git-send-email-sorganov@gmail.com> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20190704_060103_902113_184D2FB8 X-CRM114-Status: GOOD ( 11.11 ) 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: Greg Kroah-Hartman , Sascha Hauer , Sergey Organov , NXP Linux Team , Pengutronix Kernel Team , =?utf-8?q?Uwe_Kleine-K?= =?utf-8?q?=C3=B6nig?= , linux-arm-kernel@lists.infradead.org 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 Uwe Kleine-König Signed-off-by: Sergey Organov --- 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) {