From mboxrd@z Thu Jan 1 00:00:00 1970 From: Jarod Wilson Subject: Re: [PATCH 2/2] ir-core: move decoding state to ir_raw_event_ctrl Date: Wed, 16 Jun 2010 16:06:13 -0400 Message-ID: References: <20100613202718.6044.29599.stgit@localhost.localdomain> <20100613202936.6044.99651.stgit@localhost.localdomain> Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: QUOTED-PRINTABLE Return-path: Received: from mail-gx0-f174.google.com ([209.85.161.174]:49452 "EHLO mail-gx0-f174.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1759204Ab0FPUGP convert rfc822-to-8bit (ORCPT ); Wed, 16 Jun 2010 16:06:15 -0400 In-Reply-To: <20100613202936.6044.99651.stgit@localhost.localdomain> Sender: linux-input-owner@vger.kernel.org List-Id: linux-input@vger.kernel.org To: =?ISO-8859-1?Q?David_H=E4rdeman?= Cc: jarod@redhat.com, linux-media@vger.kernel.org, mchehab@redhat.com, linux-input@vger.kernel.org On Sun, Jun 13, 2010 at 4:29 PM, David H=E4rdeman w= rote: > This patch moves the state from each raw decoder into the > ir_raw_event_ctrl struct. > > This allows the removal of code like this: > > =A0 =A0 =A0 =A0spin_lock(&decoder_lock); > =A0 =A0 =A0 =A0list_for_each_entry(data, &decoder_list, list) { > =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0if (data->ir_dev =3D=3D ir_dev) > =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0break; > =A0 =A0 =A0 =A0} > =A0 =A0 =A0 =A0spin_unlock(&decoder_lock); > =A0 =A0 =A0 =A0return data; > > which is currently run for each decoder on each event in order > to get the client-specific decoding state data. > > In addition, ir decoding modules and ir driver module load > order is now independent. Centralizing the data also allows > for a nice code reduction of about 30% per raw decoder as > client lists and client registration callbacks are no longer > necessary (but still kept around for the benefit of the lirc > decoder). > > Out-of-tree modules can still use a similar trick to what > the raw decoders did before this patch until they are merged. > > Signed-off-by: David H=E4rdeman Acked-by: Jarod Wilson Tested-by: Jarod Wilson Note that I was running a version rebased atop the linuxtv staging/rc branch though. --=20 Jarod Wilson jarod@wilsonet.com -- To unsubscribe from this list: send the line "unsubscribe linux-input" = in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html