From patchwork Mon Aug 13 12:59:44 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Sean Young X-Patchwork-Id: 1312631 Return-Path: X-Original-To: patchwork-linux-media@patchwork.kernel.org Delivered-To: patchwork-process-083081@patchwork1.kernel.org Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by patchwork1.kernel.org (Postfix) with ESMTP id 079F13FC81 for ; Mon, 13 Aug 2012 13:00:08 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751362Ab2HMM74 (ORCPT ); Mon, 13 Aug 2012 08:59:56 -0400 Received: from pequod.mess.org ([93.97.41.153]:47000 "EHLO pequod.mess.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751444Ab2HMM7y (ORCPT ); Mon, 13 Aug 2012 08:59:54 -0400 Received: by pequod.mess.org (Postfix, from userid 1000) id 7D48C15FA1; Mon, 13 Aug 2012 13:59:52 +0100 (BST) From: Sean Young To: Mauro Carvalho Chehab , Jarod Wilson , Stefan Macher , linux-media@vger.kernel.org Subject: [PATCH 06/13] [media] iguanair: reset the IR state after rx overflow or receiver enable Date: Mon, 13 Aug 2012 13:59:44 +0100 Message-Id: <1344862791-30352-6-git-send-email-sean@mess.org> X-Mailer: git-send-email 1.7.2.5 In-Reply-To: <1344862791-30352-1-git-send-email-sean@mess.org> References: <1344862791-30352-1-git-send-email-sean@mess.org> Sender: linux-media-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-media@vger.kernel.org Signed-off-by: Sean Young --- drivers/media/rc/iguanair.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/drivers/media/rc/iguanair.c b/drivers/media/rc/iguanair.c index a6a19eb..9810008 100644 --- a/drivers/media/rc/iguanair.c +++ b/drivers/media/rc/iguanair.c @@ -124,6 +124,7 @@ static void process_ir_data(struct iguanair *ir, unsigned len) break; case CMD_RX_OVERFLOW: dev_warn(ir->dev, "receive overflow\n"); + ir_raw_event_reset(ir->rc); break; default: dev_warn(ir->dev, "control code %02x received\n", @@ -256,6 +257,9 @@ static int iguanair_receiver(struct iguanair *ir, bool enable) struct packet packet = { 0, DIR_OUT, enable ? CMD_RECEIVER_ON : CMD_RECEIVER_OFF }; + if (enable) + ir_raw_event_reset(ir->rc); + return iguanair_send(ir, &packet, sizeof(packet)); }