From patchwork Sat Feb 10 21:51:38 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Michael Zaidman X-Patchwork-Id: 199305 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a05:7300:50ea:b0:106:860b:bbdd with SMTP id r10csp1668300dyd; Sat, 10 Feb 2024 13:56:37 -0800 (PST) X-Forwarded-Encrypted: i=3; AJvYcCXLFlXrCerqe4+0e9SrOsYSDapQ35bL6GIAVbCU7USYSHnKYrT2XilSYm3MEDsO1SMYo3knVslXeOtoXysqIyPas0JzMw== X-Google-Smtp-Source: AGHT+IGqvPrnbFg//ZGigfw1QL1r0Bw4GpYjXQpMYf4CWXkEftHDZ69DMzjPt5E2v2PDvoO8elLm X-Received: by 2002:a05:620a:24d0:b0:785:ce6e:2893 with SMTP id m16-20020a05620a24d000b00785ce6e2893mr1015355qkn.12.1707602197439; Sat, 10 Feb 2024 13:56:37 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1707602197; cv=pass; d=google.com; s=arc-20160816; b=dVRlKgQEFF45rHWEGLeZpu8XxMuTHV8W04RJZafwrdXnEr/kExtN+Mra5FdDWKKSJc TcuV/ssupS+e7xqxIuDYSnEHuAdRmDAIKQwaxRKah+nXeib4uQU83Erqw38s1R4D9VTF F1nXWxpqmqtSHa5EfcXirraV4dlHNSi/XJI0w3ROoW4QbUP9IWyWLgu8QQa5ZiDmusl5 NPIUj1+bajNejSjlcUZwb0tfzru9ce6fDuHs4mcpkv+sw01F18/9NGxpMH3nVSMx9enO LbORvW2jxdalNN11w3x9E3TVx5b1yLRpw0jnOPqJVbXE7IRtTN6CTo3vsnm7fnZ8dX3d inOQ== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:references:in-reply-to:message-id :date:subject:cc:to:from:dkim-signature; bh=oCEBZkfO61YkhowePRQkJqIBYwM4+/L7NoDioaq1Xjk=; fh=Tk0kBfXtzmdir0Ppf9LEwHjU9Zq5tORJDp/08fHNIRQ=; b=vIRR7LaYI2XdeNiJTshCsFVxCdzmzys91169m2uoNQulqWDJuQ4Bh5MoeF3werfXVA 14RYBTgQySDYye2//zgLkEVG6ln1WqWPOZ/WhZuTSs0v89vRDKa3UKL+BrlPH6JtCWtv grOIPCmDVUd9i4RZ+DcHOEj9AdOUKs3uS5LW/FQnVyfagkhbDphegnQVF0wQ1cn6Poto VyIcCsHxekXwnDY8Nvd0tKtdwzcbgLt8JQJ4H9W9+3OV9y0D3YRl9u7ieOQV3RuYFju9 ArXZd5RlAmvw+KWN0KHe0dIa9LT44x2KPmsLyNdxyUO3gZgCdAv2y79imOeSxjnWgVc3 3r5w==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@gmail.com header.s=20230601 header.b=K95GaYks; arc=pass (i=1 spf=pass spfdomain=gmail.com dkim=pass dkdomain=gmail.com dmarc=pass fromdomain=gmail.com); spf=pass (google.com: domain of linux-kernel+bounces-60557-ouuuleilei=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-60557-ouuuleilei=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com X-Forwarded-Encrypted: i=2; AJvYcCWlX8dCL5lVqsHp0OT1fkSfqu5mGk0+5u5NApQ8//aBTlV6NY39v9SfltMaSn/tndzCZoHA5XOENSrlD7MBgPd6LufcAg== Received: from ny.mirrors.kernel.org (ny.mirrors.kernel.org. [2604:1380:45d1:ec00::1]) by mx.google.com with ESMTPS id az15-20020a05620a170f00b00783cd6583f7si2698383qkb.564.2024.02.10.13.56.37 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 10 Feb 2024 13:56:37 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-60557-ouuuleilei=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) client-ip=2604:1380:45d1:ec00::1; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20230601 header.b=K95GaYks; arc=pass (i=1 spf=pass spfdomain=gmail.com dkim=pass dkdomain=gmail.com dmarc=pass fromdomain=gmail.com); spf=pass (google.com: domain of linux-kernel+bounces-60557-ouuuleilei=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-60557-ouuuleilei=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ny.mirrors.kernel.org (Postfix) with ESMTPS id 89B6E1C247A8 for ; Sat, 10 Feb 2024 21:56:04 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 66A7A6088D; Sat, 10 Feb 2024 21:53:34 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="K95GaYks" Received: from mail-lj1-f176.google.com (mail-lj1-f176.google.com [209.85.208.176]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 25A8E605CD; Sat, 10 Feb 2024 21:53:29 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.208.176 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1707602011; cv=none; b=FbvPDI8cK5ognvBFYEHyJuMwOXh5Jy2FViBDl5s24bGphoqWKFeiq76CbAbqS9qloSbDFPgi0jMgjgrMN5X0lNvtI6rl6348JYcACcDnyZVDZc+vmJopx8mYMS4jhFlNNJTrtkO5EhSuRZTUWxYuuZJOwTb2/2I6ivZkntPAKLQ= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1707602011; c=relaxed/simple; bh=2HQBC1oCduA1pQkfyPQWKTxZnkT8froQM0NxJlNV7vQ=; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References: MIME-Version; b=HguZArN5U7T3Sdgtji2iqcdlfQxY6H1yYjzNiNDllfDjAGwcAVTMPxTj95q62i7Y7FYsEZy/zg7GBclKvdRsUTXIFpwIfrTQeGrptXMyaBxorB6ih4aOekHiExwuDYJrhemJT3qEYqOImHQzbziy279qaIjNQ1gUj+ydwfSAdGg= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com; spf=pass smtp.mailfrom=gmail.com; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b=K95GaYks; arc=none smtp.client-ip=209.85.208.176 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=gmail.com Received: by mail-lj1-f176.google.com with SMTP id 38308e7fff4ca-2d0ce22b5f3so22955021fa.1; Sat, 10 Feb 2024 13:53:29 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1707602008; x=1708206808; darn=vger.kernel.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=oCEBZkfO61YkhowePRQkJqIBYwM4+/L7NoDioaq1Xjk=; b=K95GaYksu40tCIzBWF+EsENOAXhkY9qU0IGPFFN+Vz57zzWfT8fJFVRsZfV4RPMnFn xuU9jkUvGVeVyh+KJcVCGZEuLAKmnKQFzJOL55iTZFy+XnkfUfNu/vdZr8Npt+2LJXik DndQOBQQORZNWNrw8WHDMfmYfvVBUqrSaZXPyz8PKpuzJlZ9miCfJhdgTv/QlToNiWVR TAwDLSJcPqNpWm06VUs3MmSs96wg4GuaTlRj8drhtQDuDMb6w4BZLhhY+LauYOiZwJhb XC+w95mvKxEXUg6dYlctFQRt/JV7M3uiDY8Ggl3BJnvGtZi6U870Ry8r2N/rm1k2/1+I Ne4w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1707602008; x=1708206808; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=oCEBZkfO61YkhowePRQkJqIBYwM4+/L7NoDioaq1Xjk=; b=nxhXeMYEmx90RFKvwZvLvb4E9SCME8AsVvV/mSiNGJz+lvEN8SAAI9s8WcwTPpDMSA qeMWa1ewiP25WxvdeT0LoKAzUQiixqP/wYwWX5NBQYukEocFLdeyFEeK36PZE7gOFmyq 5b7WlsBq4InDNytyR8iitxXRCS+/VeYt8NuxBwgsrUizy92wQi+jZydh2DJ0ovO21oWZ /yygLYkHSL3zns0o6Dd8GT/mdZW3Kz1fOciFu7ggYK8LxUFJ7HDJZ+sb7uYIXTmS+L0Q KYp52tLORSjym1vX2Dp28KwP+1cLgxG8xeuqQ5Jv0E/GYbU5INeGo76sFII5unn6Njvm EHvg== X-Forwarded-Encrypted: i=1; AJvYcCVanm+PvCoeW4NRY81vsTZAqn1IjMU6jXDS1u4+6Rhg0H5AkFkQHnYORowdmNYAE4hTRX7Xb91bvRCn5/MNUIjl6N9URgjtNNE4xoB//GxypVWjc1RcoD/gJHgndcfhOJ8OaSmhk7Z3XSk= X-Gm-Message-State: AOJu0YyPJYZa0zsWzfw0+kUKIvX91rv2KdpIBIfVV5Wg2y2bvHs/ssZs 59uNVM90l22UspzEeAnBF8EDHmG0JvNiC50Oc3Cg2ppHvTHUxkQb X-Received: by 2002:a19:6501:0:b0:511:636f:ac29 with SMTP id z1-20020a196501000000b00511636fac29mr1426761lfb.64.1707602008134; Sat, 10 Feb 2024 13:53:28 -0800 (PST) X-Forwarded-Encrypted: i=1; AJvYcCXK9kSfWuJsAjJtx34wlp/Sj2QLR8k0bLBY3mFY6YRkal3tGIOAusIHwEHuJ4b0DRjK/k8DiNiTwoXEQEKeNsrYxb4K6Qb17DznISY17hsFB2YrEXOpPlu46TsGxKj4DG88oiyyeywDqa1CfFcG3A9CcZ0czweZYKdXhtCfZHX8JqY6N0gZUG04HXfKa8jhly8HdBj42aSre7K4kDyErH2qOWWoapaN0DpMqWXJTZovgLrWGj/T9GmW89iInQSpxJipc7KbexFrXw9qtTQuK7R1/FxSGPzE8vLOY0VB369MNSnVQ8o54MnztpGct7H5cKEmBX7I4lwZokIjd+Ln/pf/LLilrlQX+VzoWanftkI5ypCDKKewZA== Received: from m2.. (89-139-223-180.bb.netvision.net.il. [89.139.223.180]) by smtp.googlemail.com with ESMTPSA id a7-20020a19ca07000000b0051189b53f93sm24005lfg.302.2024.02.10.13.53.26 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 10 Feb 2024 13:53:27 -0800 (PST) From: Michael Zaidman To: chrysh@christina-quast.de, daniel.beer@igorinstitute.com, jikos@kernel.org Cc: linux-kernel@vger.kernel.org, linux-input@vger.kernel.org, linux-serial@vger.kernel.org, ilpo.jarvinen@linux.intel.com, johan@kernel.org, gregkh@linuxfoundation.org, equinox@diac24.net, michael.zaidman@gmail.com Subject: [PATCH v1 10/19] hid-ft260: uart: do not configure baud rate twice Date: Sat, 10 Feb 2024 23:51:38 +0200 Message-Id: <20240210215147.77629-11-michael.zaidman@gmail.com> X-Mailer: git-send-email 2.40.1 In-Reply-To: <20240210215147.77629-1-michael.zaidman@gmail.com> References: <20240210215147.77629-1-michael.zaidman@gmail.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1790550681678480851 X-GMAIL-MSGID: 1790550681678480851 The uart speed settings are configured twice per session: the old settings - by the ft260_uart_port_activate() and the new - by the ft260_uart_set_termios() routine. We do not need to configure the old settings per tty session since they have already been sent to the device in the probe and passed to the tty via termios in the ft260_driver_init. Removed their coonfiguration from the ft260_uart_port_activate routine. Signed-off-by: Michael Zaidman --- drivers/hid/hid-ft260.c | 1 - 1 file changed, 1 deletion(-) diff --git a/drivers/hid/hid-ft260.c b/drivers/hid/hid-ft260.c index 6266e4f1100d..63839f02e9b5 100644 --- a/drivers/hid/hid-ft260.c +++ b/drivers/hid/hid-ft260.c @@ -1524,7 +1524,6 @@ static int ft260_uart_activate(struct tty_port *tport, struct tty_struct *tty) kfifo_reset(&port->xmit_fifo); spin_unlock(&port->write_lock); - ft260_uart_change_speed(port, &tty->termios, NULL); clear_bit(TTY_IO_ERROR, &tty->flags); /* Wake up the chip as early as possible to not miss incoming data */