From patchwork Sat May 29 17:17:27 2010 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jarod Wilson X-Patchwork-Id: 103089 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by demeter.kernel.org (8.14.3/8.14.3) with ESMTP id o4THHY8n026594 for ; Sat, 29 May 2010 17:17:34 GMT Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754341Ab0E2RR2 (ORCPT ); Sat, 29 May 2010 13:17:28 -0400 Received: from mail-vw0-f46.google.com ([209.85.212.46]:40863 "EHLO mail-vw0-f46.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753893Ab0E2RR2 convert rfc822-to-8bit (ORCPT ); Sat, 29 May 2010 13:17:28 -0400 Received: by vws11 with SMTP id 11so327254vws.19 for ; Sat, 29 May 2010 10:17:27 -0700 (PDT) MIME-Version: 1.0 Received: by 10.224.53.131 with SMTP id m3mr890926qag.266.1275153447117; Sat, 29 May 2010 10:17:27 -0700 (PDT) Received: by 10.229.224.200 with HTTP; Sat, 29 May 2010 10:17:27 -0700 (PDT) X-Originating-IP: [72.93.233.2] In-Reply-To: <20100528195945.GA7305@redhat.com> References: <20100528195945.GA7305@redhat.com> Date: Sat, 29 May 2010 13:17:27 -0400 Message-ID: Subject: [PATCH v2] IR: let all protocol decoders have a go at raw data From: Jarod Wilson To: linux-media@vger.kernel.org Sender: linux-media-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-media@vger.kernel.org X-Greylist: IP, sender and recipient auto-whitelisted, not delayed by milter-greylist-4.2.3 (demeter.kernel.org [140.211.167.41]); Sat, 29 May 2010 17:17:34 +0000 (UTC) diff --git a/drivers/media/IR/ir-raw-event.c b/drivers/media/IR/ir-raw-event.c index ea68a3f..b832717 100644 --- a/drivers/media/IR/ir-raw-event.c +++ b/drivers/media/IR/ir-raw-event.c @@ -31,8 +31,9 @@ static DEFINE_SPINLOCK(ir_raw_handler_lock); * * Calls ir_raw_handler::ops for all registered IR handlers. It prevents * new decode addition/removal while running, by locking ir_raw_handler_lock - * mutex. If an error occurs, it stops the ops. Otherwise, it returns a sum - * of the return codes. + * mutex. If an error occurs, we keep going, as in the decode case, each + * decoder must have a crack at decoding the data. We return a sum of the + * return codes, which will be either 0 or negative for current callers. */ #define RUN_DECODER(ops, ...) ({ \ struct ir_raw_handler *_ir_raw_handler; \ @@ -41,8 +42,6 @@ static DEFINE_SPINLOCK(ir_raw_handler_lock); list_for_each_entry(_ir_raw_handler, &ir_raw_handler_list, list) { \ if (_ir_raw_handler->ops) { \ _rc = _ir_raw_handler->ops(__VA_ARGS__); \ - if (_rc < 0) \ - break; \ _sumrc += _rc; \ } \ } \