From patchwork Mon Jul 16 11:51:56 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Johan Hovold X-Patchwork-Id: 10526575 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id 57342600D0 for ; Mon, 16 Jul 2018 11:52:26 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 5025128536 for ; Mon, 16 Jul 2018 11:52:26 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 44327288F3; Mon, 16 Jul 2018 11:52:26 +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.8 required=2.0 tests=BAYES_00,DKIM_SIGNED, MAILING_LIST_MULTI, RCVD_IN_DNSWL_HI, T_DKIM_INVALID 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 EB4FB28536 for ; Mon, 16 Jul 2018 11:52:25 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1729980AbeGPMTa (ORCPT ); Mon, 16 Jul 2018 08:19:30 -0400 Received: from mail-lj1-f196.google.com ([209.85.208.196]:42003 "EHLO mail-lj1-f196.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727857AbeGPMTa (ORCPT ); Mon, 16 Jul 2018 08:19:30 -0400 Received: by mail-lj1-f196.google.com with SMTP id x12-v6so4017004ljj.9 for ; Mon, 16 Jul 2018 04:52:23 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=sender:from:to:cc:subject:date:message-id:in-reply-to:references; bh=oecL3UJoRh8zNcv7NReN328RCa4cPFXOpEieTFjxhQo=; b=A+fHS5ynMqt+p1evk6kkJt5el2kbw33gH28YNP40riYZUI5NVy1vQ6MhYD8zDuhD22 tpQMWLeGLTYNnxvFCiyuKE6wJstgoVkDoA9xC61V2BXTlcggoPG7A6oC3yaJ/5C1He0S OGm6Zsc+M/DdUIOBisk1Mgkm94Y369nvHq6d14/U7iaJXYE8U778IyJHdUe9cAZE4GJ7 nHBy4jdRNUfI7F60UtxcsZtyHtcWoyv08k/TebrJLJUumeiz95LrtdDav7ACrAaY7Gmj 9YhndMhThJQx/2LOEQHsy8g74ZnWmV+IYvfvcIUgq2KO9CpfwD9cJbxcYHKx3lREvD2r SuZg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:sender:from:to:cc:subject:date:message-id :in-reply-to:references; bh=oecL3UJoRh8zNcv7NReN328RCa4cPFXOpEieTFjxhQo=; b=DhfuM6veNi8aDfuU4vQ1IXg89f3Y07LN20GZaww+hWcr+gPoaOlZnwV2P0au2rmHWd Knw1SI1JWliphZkEf5hvCHm0gIuxIrYIDUKyLMBgf3fPRox6W2LnRWJQTmP8QghN+G+Q cE36tg6U2jlw5aPEgQjffOfEyaqHZOxmE+iEl81kwHWPVOuxhdzVxuI7OQg7A+/XxInZ s+K9iAZHfWmyLSjGbsob65u6FD5TzNuKUhTJ+EDHC3oa0VtKrQIyNObWIZ+BQAJ9O9LR hhPvhlKc/jCR/bVwT3qWc2AbGIAzMucOwZFSFx2ngGa2rNNMpyTWfp1NiQLWfmAMLsaS C2CA== X-Gm-Message-State: AOUpUlGY052qUuxz+zvl0rKptkyEje+3oxdftGpA6QHZclm42igM5g47 Cq7S6Mww++PmL6cBhXy2e54= X-Google-Smtp-Source: AAOMgpdD1YvvFDx3/atl6Y/aqVXibys6a76LV5nRys+fBdbWpHsh+ph7ZJdPhdmD1uC9ZpNj5NQzbA== X-Received: by 2002:a2e:3c1a:: with SMTP id j26-v6mr10429715lja.149.1531741943110; Mon, 16 Jul 2018 04:52:23 -0700 (PDT) Received: from xi.terra (c-8bb2e655.07-184-6d6c6d4.bbcust.telenor.se. [85.230.178.139]) by smtp.gmail.com with ESMTPSA id m8-v6sm3319264ljj.10.2018.07.16.04.52.22 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Mon, 16 Jul 2018 04:52:22 -0700 (PDT) Received: from johan by xi.terra with local (Exim 4.91) (envelope-from ) id 1ff234-0007aK-AF; Mon, 16 Jul 2018 13:52:14 +0200 From: Johan Hovold To: Johan Hovold Cc: linux-usb@vger.kernel.org Subject: [PATCH 2/2] USB: iuu_phoenix: drop redundant input-speed re-encoding Date: Mon, 16 Jul 2018 13:51:56 +0200 Message-Id: <20180716115156.29106-2-johan@kernel.org> X-Mailer: git-send-email 2.18.0 In-Reply-To: <20180716115156.29106-1-johan@kernel.org> References: <20180716115156.29106-1-johan@kernel.org> 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 Drop redundant input-speed re-encoding at every open(). The output and input speeds are initialised to the same value and are kept in sync on termios updates. Signed-off-by: Johan Hovold Reviewed-by: Greg Kroah-Hartman --- drivers/usb/serial/iuu_phoenix.c | 3 --- 1 file changed, 3 deletions(-) diff --git a/drivers/usb/serial/iuu_phoenix.c b/drivers/usb/serial/iuu_phoenix.c index 87c8dd064205..449e89db9cea 100644 --- a/drivers/usb/serial/iuu_phoenix.c +++ b/drivers/usb/serial/iuu_phoenix.c @@ -962,9 +962,6 @@ static int iuu_open(struct tty_struct *tty, struct usb_serial_port *port) struct iuu_private *priv = usb_get_serial_port_data(port); baud = tty->termios.c_ospeed; - tty->termios.c_ispeed = baud; - /* Re-encode speed */ - tty_encode_baud_rate(tty, baud, baud); dev_dbg(dev, "%s - baud %d\n", __func__, baud); usb_clear_halt(serial->dev, port->write_urb->pipe);