From patchwork Wed Nov 9 16:13:34 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Sean Young X-Patchwork-Id: 9419725 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id B641A601C0 for ; Wed, 9 Nov 2016 16:13:42 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id AAEA1289E5 for ; Wed, 9 Nov 2016 16:13:42 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 9FF8B28D28; Wed, 9 Nov 2016 16:13:42 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-6.9 required=2.0 tests=BAYES_00,RCVD_IN_DNSWL_HI autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 5DB4C289E5 for ; Wed, 9 Nov 2016 16:13:42 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753309AbcKIQNj (ORCPT ); Wed, 9 Nov 2016 11:13:39 -0500 Received: from gofer.mess.org ([80.229.237.210]:45327 "EHLO gofer.mess.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753082AbcKIQNi (ORCPT ); Wed, 9 Nov 2016 11:13:38 -0500 Received: by gofer.mess.org (Postfix, from userid 1000) id 60CF260C59; Wed, 9 Nov 2016 16:13:36 +0000 (GMT) From: Sean Young To: Mauro Carvalho Chehab Cc: linux-media@vger.kernel.org Subject: [PATCH] [media] sanyo decoder: address was being truncated Date: Wed, 9 Nov 2016 16:13:34 +0000 Message-Id: <1478708015-1164-4-git-send-email-sean@mess.org> X-Mailer: git-send-email 2.1.4 Sender: linux-media-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-media@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP The address is 13 bits but it was stuffed in an u8, so 5 bits are missing from the scancode. Signed-off-by: Sean Young --- drivers/media/rc/ir-sanyo-decoder.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/drivers/media/rc/ir-sanyo-decoder.c b/drivers/media/rc/ir-sanyo-decoder.c index 7331e5e7..b07d9ca 100644 --- a/drivers/media/rc/ir-sanyo-decoder.c +++ b/drivers/media/rc/ir-sanyo-decoder.c @@ -56,7 +56,8 @@ static int ir_sanyo_decode(struct rc_dev *dev, struct ir_raw_event ev) { struct sanyo_dec *data = &dev->raw->sanyo; u32 scancode; - u8 address, command, not_command; + u16 address; + u8 command, not_command; if (!is_timing_event(ev)) { if (ev.reset) {