From mboxrd@z Thu Jan 1 00:00:00 1970 From: Dmitry Torokhov Subject: Re: [PATCH 10/10] thinkpad-acpi: sync input device EV_SW state directly Date: Tue, 8 Dec 2009 17:45:14 -0800 Message-ID: <200912081745.14725.dmitry.torokhov@gmail.com> References: <1260322590-5571-1-git-send-email-hmh@hmh.eng.br> <1260322590-5571-11-git-send-email-hmh@hmh.eng.br> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: In-Reply-To: <1260322590-5571-11-git-send-email-hmh-N3TV7GIv+o9fyO9Q7EP/yw@public.gmane.org> List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: ibm-acpi-devel-bounces-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f@public.gmane.org To: Henrique de Moraes Holschuh Cc: linux-acpi-u79uwXL29TY76Z2rM5mHXA@public.gmane.org, Johannes Berg , ibm-acpi-devel-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f@public.gmane.org, Alan Jenkins , Len Brown List-Id: linux-acpi@vger.kernel.org On Tuesday 08 December 2009 05:36:30 pm Henrique de Moraes Holschuh wrote: > Before we register the input device, sync the input layer EV_SW state > directly by setting the bitmaps, to avoid issuing a gratuitous event > for the initial state of these switches. > > I will propose a clean input layer API for this and change the driver > to use it later, but I'd rather get the driver fix in mainline ASAP. > Just do input_report_switch() before registering the device, it will do the right thing. Input core guarantees (and will continue doing so) that it is safe to pass events to the device as soon as it was allocated with input_allocate_device(). -- Dmitry ------------------------------------------------------------------------------ Return on Information: Google Enterprise Search pays you back Get the facts. http://p.sf.net/sfu/google-dev2dev