From patchwork Tue Jan 24 20:36:05 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Corinna Vinschen X-Patchwork-Id: 9648 Received: from mail.tu-berlin.de ([130.149.7.33]) by www.linuxtv.org with esmtp (Exim 4.72) (envelope-from ) id 1RpnSI-0002VG-K8 for patchwork@linuxtv.org; Tue, 24 Jan 2012 21:59:02 +0100 X-tubIT-Incoming-IP: 209.132.180.67 Received: from vger.kernel.org ([209.132.180.67]) by mail.tu-berlin.de (exim-4.75/mailfrontend-2) with esmtp for id 1RpnSI-0006zp-GO; Tue, 24 Jan 2012 21:59:02 +0100 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1757429Ab2AXU7A (ORCPT ); Tue, 24 Jan 2012 15:59:00 -0500 Received: from mail-n.franken.de ([193.175.24.27]:57803 "EHLO mail-n.franken.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1756543Ab2AXU67 (ORCPT ); Tue, 24 Jan 2012 15:58:59 -0500 X-Greylist: delayed 1370 seconds by postgrey-1.27 at vger.kernel.org; Tue, 24 Jan 2012 15:58:59 EST Received: from aqua.hirmke.de (aquarius.franken.de [193.175.24.89]) by mail-n.franken.de (Postfix) with ESMTP id 9BD181C0C0BD8 for ; Tue, 24 Jan 2012 21:36:07 +0100 (CET) Received: from calimero.vinschen.de (calimero.vinschen.de [192.168.129.6]) by aqua.hirmke.de (Postfix) with ESMTP id D7AC626C066 for ; Tue, 24 Jan 2012 21:36:06 +0100 (CET) Received: by calimero.vinschen.de (Postfix, from userid 500) id 5716C2C00BE; Tue, 24 Jan 2012 21:36:06 +0100 (CET) Date: Tue, 24 Jan 2012 21:36:05 +0100 From: Corinna Vinschen To: linux-media@vger.kernel.org Subject: [PATCH] imon: Input from ffdc device type ignored Message-ID: <20120124203605.GQ2456@calimero.vinschen.de> MIME-Version: 1.0 Content-Disposition: inline User-Agent: Mutt/1.5.21 (2010-09-15) Sender: linux-media-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-media@vger.kernel.org X-PMX-Version: 5.6.1.2065439, Antispam-Engine: 2.7.2.376379, Antispam-Data: 2012.1.24.204515 X-PMX-Spam: Gauge=IIIIIIII, Probability=8%, Report=' MSGID_ADDED_BY_MTA 0.05, BODYTEXTP_SIZE_3000_LESS 0, BODY_SIZE_1900_1999 0, BODY_SIZE_2000_LESS 0, BODY_SIZE_5000_LESS 0, BODY_SIZE_7000_LESS 0, __ANY_URI 0, __CD 0, __CP_URI_IN_BODY 0, __CT 0, __CT_TEXT_PLAIN 0, __HAS_MSGID 0, __HAS_X_MAILING_LIST 0, __MIME_TEXT_ONLY 0, __MIME_VERSION 0, __SANE_MSGID 0, __SUBJ_ALPHA_END 0, __TO_MALFORMED_2 0, __TO_NO_NAME 0, __URI_NO_WWW 0, __URI_NS , __USER_AGENT 0' Hi, I have an iMON device (device ID 15c2:ffdc) in my multimedia pc, which worked without too many problems with pre-3.x kernels and the lirc_imon module. With the new imon module since kernel 3.0 the remote worked as expected, just everytime the module got reloaded or the machine was rebooted, the machine got a kernel oops. With kernel version 3.2, the oops is fixed, but now the input from the remote is not recognized at all. There are no input entries in the log. I have a patch to drivers/media/rc/imon.c for this issue which "works for me"(tm), but I'm not sure it's the right thing to do. With this patch keypresses from the remote are recognized and the kernel oops doesn't occur either. It also fixes a minor typo (intf0 instead of intf1) in imon_init_intf1. See patch below. Is that ok to go into mainline? Please keep me CCed, I'm not subscribed to the list. Thanks, Corinna Signed-off-by: Corinna Vinschen --- To unsubscribe from this list: send the line "unsubscribe linux-media" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html --- a/drivers/media/rc/imon.c +++ b/drivers/media/rc/imon.c @@ -1658,7 +1658,7 @@ static void usb_rx_callback_intf0(struct return; ictx = (struct imon_context *)urb->context; - if (!ictx || !ictx->dev_present_intf0) + if (!ictx) return; switch (urb->status) { @@ -1669,7 +1669,8 @@ static void usb_rx_callback_intf0(struct break; case 0: - imon_incoming_packet(ictx, urb, intfnum); + if (ictx->dev_present_intf0) + imon_incoming_packet(ictx, urb, intfnum); break; default: @@ -2242,7 +2243,7 @@ find_endpoint_failed: mutex_unlock(&ictx->lock); usb_free_urb(rx_urb); rx_urb_alloc_failed: - dev_err(ictx->dev, "unable to initialize intf0, err %d\n", ret); + dev_err(ictx->dev, "unable to initialize intf1, err %d\n", ret); return NULL; }