From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1757047AbYJETEj (ORCPT ); Sun, 5 Oct 2008 15:04:39 -0400 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S1755801AbYJETE2 (ORCPT ); Sun, 5 Oct 2008 15:04:28 -0400 Received: from fhw-relay07.plus.net ([212.159.14.148]:42845 "EHLO fhw-relay07.plus.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1755777AbYJETE2 (ORCPT ); Sun, 5 Oct 2008 15:04:28 -0400 Message-ID: <48E90FC9.2060903@yahoo.com> Date: Sun, 05 Oct 2008 20:04:41 +0100 From: Sitsofe Wheeler User-Agent: Thunderbird 2.0.0.17 (Macintosh/20080914) MIME-Version: 1.0 To: Matthew Garrett CC: dmitry.torokhov@gmail.com, IvDoorn@gmail.com, hmh@hmh.eng.br, linux-kernel@vger.kernel.org Subject: Re: [PATCH v3] rfkill-input doesn't work until 5 minutes after boot References: <20081004204342.GA29620@srcf.ucam.org> <20081005004334.GA31844@srcf.ucam.org> <20081005110226.GB4087@srcf.ucam.org> In-Reply-To: <20081005110226.GB4087@srcf.ucam.org> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Plusnet-Relay: 19a1a3323532f2ac8e454a066c486487 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Matthew Garrett wrote: > rfkill-input implements debounce as follows: > > if (time_after(jiffies, task->last + msecs_to_jiffies(200))) { > > However, task->last is initialised to 0 while jiffies starts at -300*HZ. > Any input within 5 minutes of kernel start is therefore ignored. Fix by > initialising task->last correctly. This patch also works for me. Tested-by: Sitsofe Wheeler -- Sitsofe | http://sucs.org/~sits/