From patchwork Sun Apr 21 12:21:53 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Johan Hovold X-Patchwork-Id: 10910501 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 9F85C14DB for ; Sun, 21 Apr 2019 12:22:07 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 8F1162864A for ; Sun, 21 Apr 2019 12:22:07 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 80FC5287B5; Sun, 21 Apr 2019 12:22:07 +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=-7.9 required=2.0 tests=BAYES_00,MAILING_LIST_MULTI, RCVD_IN_DNSWL_HI autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 387F32864A for ; Sun, 21 Apr 2019 12:22:07 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727514AbfDUMWF (ORCPT ); Sun, 21 Apr 2019 08:22:05 -0400 Received: from mail-lf1-f65.google.com ([209.85.167.65]:33405 "EHLO mail-lf1-f65.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727495AbfDUMWE (ORCPT ); Sun, 21 Apr 2019 08:22:04 -0400 Received: by mail-lf1-f65.google.com with SMTP id j11so7136771lfm.0 for ; Sun, 21 Apr 2019 05:22:02 -0700 (PDT) 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=lEsJXvjwb/PGf4av9Kna2ZrjEm18j4+1PhbIO6niJ8o=; b=muKhPTJkfQ4BvjPF8QFm3lj8Dh3MA0RL127PPmYxkUEX3qUVm64087aCzMc8DeUC+F yojmedf/3Sc5fw7Lnjre8qAa7TP5aDa1FEANCvzyTfPDKKSJ2KBg5b72DMYM/GC+MPZW gPrR2o3+f1tnQMwI1e84IrY3kBQL/ntZ32ANUXAZfpjFhe1G8WEB5L51DLI4ip8AE31P TqNMnUFnuPCobuQAr4g83GE/HUoWFoEr9d6e4uCHAAOtxDpPgU/7r2pdPeVF3DE7nbq9 xsqsvw/8FYfl7Ab9T64GjFAaXSB0PofjH24vSfJ3luRxmG/JMmoMiZn9L+aSA59iUoI2 MbIg== X-Gm-Message-State: APjAAAV3iBhdbOCb+VRCZGDMC2acciZn4M1nNmQKrL6NfDvNCWDZKojN Vlv98bdlUsanpEjtRcAMK2NvOUN0 X-Google-Smtp-Source: APXvYqxbV2gy/SI7rV1Tpzm2vmiye0w2jrTo0CVWo+Pgtk5G31JtIxcQCVrAKn5tDZYKpY8udpqmeA== X-Received: by 2002:a19:1dc7:: with SMTP id d190mr7569632lfd.48.1555849321660; Sun, 21 Apr 2019 05:22:01 -0700 (PDT) Received: from xi.terra (c-74bee655.07-184-6d6c6d4.bbcust.telenor.se. [85.230.190.116]) by smtp.gmail.com with ESMTPSA id k25sm2221230ljc.14.2019.04.21.05.21.54 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Sun, 21 Apr 2019 05:21:55 -0700 (PDT) Received: from johan by xi.terra with local (Exim 4.91) (envelope-from ) id 1hIBTs-0006uJ-PB; Sun, 21 Apr 2019 14:22:00 +0200 From: Johan Hovold To: linux-usb@vger.kernel.org Cc: Greg Kroah-Hartman , Johan Hovold Subject: [PATCH 8/9] USB: serial: oti6858: simplify init_termios Date: Sun, 21 Apr 2019 14:21:53 +0200 Message-Id: <20190421122154.26465-9-johan@kernel.org> X-Mailer: git-send-email 2.21.0 In-Reply-To: <20190421122154.26465-1-johan@kernel.org> References: <20190421122154.26465-1-johan@kernel.org> MIME-Version: 1.0 Sender: linux-usb-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-usb@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP Simplify init_termios which is only used to override the initial baudrate. Signed-off-by: Johan Hovold --- drivers/usb/serial/oti6858.c | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/drivers/usb/serial/oti6858.c b/drivers/usb/serial/oti6858.c index ae9cb15ee02d..38ae0fc826cc 100644 --- a/drivers/usb/serial/oti6858.c +++ b/drivers/usb/serial/oti6858.c @@ -393,10 +393,7 @@ static int oti6858_chars_in_buffer(struct tty_struct *tty) static void oti6858_init_termios(struct tty_struct *tty) { - tty->termios = tty_std_termios; - tty->termios.c_cflag = B38400 | CS8 | CREAD | HUPCL | CLOCAL; - tty->termios.c_ispeed = 38400; - tty->termios.c_ospeed = 38400; + tty_encode_baud_rate(tty, 38400, 38400); } static void oti6858_set_termios(struct tty_struct *tty,