Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S932133Ab1BXUlx (ORCPT ); Thu, 24 Feb 2011 15:41:53 -0500 Received: from ch-smtp02.sth.basefarm.net ([80.76.149.213]:36241 "EHLO ch-smtp02.sth.basefarm.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753687Ab1BXUlt (ORCPT ); Thu, 24 Feb 2011 15:41:49 -0500 From: "Henrik Rydberg" Date: Thu, 24 Feb 2011 21:43:00 +0100 To: Benjamin Tissoires Cc: Jiri Kosina , Dmitry Torokhov , =?iso-8859-1?Q?St=E9phane?= Chatty , linux-input@vger.kernel.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH] hid: Do not create input devices for feature reports Message-ID: <20110224204300.GA2423@polaris.bitmath.org> References: <1298572259-18173-1-git-send-email-rydberg@euromail.se> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.21 (2010-09-15) X-Originating-IP: 83.248.192.164 X-Scan-Result: No virus found in message 1Pshzy-0005ff-6q. X-Scan-Signature: ch-smtp02.sth.basefarm.net 1Pshzy-0005ff-6q 79de67ecdc0e0afe00108682b8b1d399 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1364 Lines: 34 On Thu, Feb 24, 2011 at 08:50:55PM +0100, Benjamin Tissoires wrote: > Hi Henrik, > > Thanks for spotting this. BTW, I'm not happy with your solution. > > You are sending the feature report before creating the struct > hid_input. To be consistent with the rest, we have to keep the same > signature. Today, the code does not make any use of it. But I use it > in my devel branch to auto-detect the maximum contact count of the > device. This was the safest place to call input_mt_init_slots. Well, the whole point is "which input device". It would only be well-defined when the hid device has a single input device. The feature callback could be called last, however, if that helps. > How about adding hidinput as an argument to report_features > > and calling it after the " for (k = HID_INPUT_REPORT; k <= > HID_OUTPUT_REPORT; k++) {" loop with > > list_for_each_entry_safe(hidinput, next, &hid->inputs, list) > report_features(hid, hidinput); > > I did not even try to compile it right now (I don't have any > multitouch device right now) but I'll be able to make further tests > tomorrow. Thanks, Henrik -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/