Received: by 2002:a05:6a10:5bc5:0:0:0:0 with SMTP id os5csp497937pxb; Fri, 15 Oct 2021 09:44:38 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxAtWOLe5Zp8sjSxJhlQ93i3BKyxdmXeim4uman/se72ItNU2XIVxcUSA8xl4ADd5uHC/QV X-Received: by 2002:a62:5297:0:b0:3f4:263a:b078 with SMTP id g145-20020a625297000000b003f4263ab078mr12369576pfb.20.1634316278400; Fri, 15 Oct 2021 09:44:38 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1634316278; cv=none; d=google.com; s=arc-20160816; b=PQu3rX5occ7xjje+j+ThFV8LvPFX4IKhbsFDPDMQSbJLqVsp0gZNXHmpp1oO1O6cyD 3Ry8n8+Vd6hVrlWF+mJ2r5wrF4J1zv6NeZrimQ+iN2mD8bXDhm0ZtLkjvlXjmec+lgy9 Ca3/wTYHETUKyfghV65KeKJA/SEH4Y98pXPFv0YDk5YAzboohazUcIUKLOWOW84mSH0o U5tCNscgTucytBGAtsJ9d+HNDO7PBPwKRwu0TL+9Qq7Nf3ubXRn9yQkP6tE8fd8uMb3i M8wxU8KOxm6jyqm28JhbP1O23bVGuE1AJe4bxx1tuu3YM+G9sQ2DIKhtCevkEvPipEaq V+iA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:date:dkim-signature; bh=0AvZfdMRbemGuvqMOUpIehAi8iGvS0fup+BMDYGpfiQ=; b=cUV/zPZJByhwrLGvn37fwvjH+lGRKYaow+x+gGD7OYFDWUYK3HhzPZ8o4SCYmcuwzF DnBSmCwsuvbhMB/d+iR42/PRQtIGc6PnY7a1aKKN0Y1DcxsZIomwG8vQ+I20D+i/YCoR tR8gP4+ZAGTDq74zfGETUZfAcp9EufI2+8JkjBQE8NWsmxNXtgMxd30tAO98IKAkOxcN JeibxpYo1Nj/VSfCSdZxQ4ANpdMABZChSVMBgGVYzBW5umBdoWrBtfoPmASoPoNv9lZ+ bODLyUSVGXfulxRtNSO+mVFbJszaielCDSuEDepK0Ny880Gxj6+v0GDALhfg9gDAnbZC sclw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=AziAd0fS; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id u24si7620915pfm.250.2021.10.15.09.44.25; Fri, 15 Oct 2021 09:44:38 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=AziAd0fS; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S234343AbhJOInX (ORCPT + 99 others); Fri, 15 Oct 2021 04:43:23 -0400 Received: from mail.kernel.org ([198.145.29.99]:39164 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S237235AbhJOInW (ORCPT ); Fri, 15 Oct 2021 04:43:22 -0400 Received: by mail.kernel.org (Postfix) with ESMTPSA id DDEB4611C2; Fri, 15 Oct 2021 08:41:15 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1634287276; bh=kAdxWi7lhPZh6+Y8to2Q5TxPurbAjRC53PQ5fvWF+08=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=AziAd0fSfqteyBGRKJxuec31+ee4K4lWuN8L82JOX6B9y2s9q38DpbG0j77B0Kgzy r3aGyEUYNZM+sk1tRqeIJuvdIs+N61cuoZQWXjNEBNB1BTSZbx4CgDrua/d4j1k6t9 yIU2TfyBswB7ZdY77N+Xrcm3ve1rmhGSI8Q4XjqE= Date: Fri, 15 Oct 2021 10:41:13 +0200 From: Greg KH To: lianzhi chang Cc: linux-kernel@vger.kernel.org, dmitry.torokhov@gmail.com, jirislaby@kernel.org, andriy.shevchenko@linux.intel.com, linux-input@vger.kernel.org, 282827961@qq.com Subject: Re: [PATCH] input&tty: Fix the keyboard led light display problem Message-ID: References: <20211015083613.7429-1-changlianzhi@uniontech.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20211015083613.7429-1-changlianzhi@uniontech.com> Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Fri, Oct 15, 2021 at 04:36:13PM +0800, lianzhi chang wrote: > Switching from the desktop environment to the tty environment, > the state of the keyboard led lights and the state of the keyboard > lock are inconsistent. This is because the attribute kb->kbdmode > of the tty bound in the desktop environment (xorg) is set to > VC_OFF, which causes the ledstate and kb->ledflagstate > values of the bound tty to always be 0, which causes the switch > from the desktop When to the tty environment, the LED light > status is inconsistent with the keyboard lock status. > > Signed-off-by: lianzhi chang > --- > The latest changes: > (1) Move the definition of ledstate to the input module (/drivers/input/input.c), > and set or get its value through the input_update_ledstate and input_get_ledstate > functions. > (2) To update the ledstate reference in keyboard.c, you must first get the value > through input_get_ledstate. > (3) Other necessary changes You have not changed the subject line at all. Look at how others submit patches that are new versions on the mailing list, and most importantly, read the documentation we have about this. thanks, greg k-h