From patchwork Sat Mar 27 12:47:45 2010 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "istvan_v@mailbox.hu" X-Patchwork-Id: 88697 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 o2RCdmgf000808 for ; Sat, 27 Mar 2010 12:41:52 GMT Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753164Ab0C0Mlv (ORCPT ); Sat, 27 Mar 2010 08:41:51 -0400 Received: from mail.juropnet.hu ([212.24.188.131]:57599 "EHLO mail.juropnet.hu" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753153Ab0C0Mlv (ORCPT ); Sat, 27 Mar 2010 08:41:51 -0400 Received: from kabelnet-194-37.juropnet.hu ([91.147.194.37]) by mail.juropnet.hu with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.69) (envelope-from ) id 1NvVKm-0007OM-4a for linux-media@vger.kernel.org; Sat, 27 Mar 2010 13:41:50 +0100 Message-ID: <4BADFE71.5090309@mailbox.hu> Date: Sat, 27 Mar 2010 13:47:45 +0100 From: "istvan_v@mailbox.hu" User-Agent: Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.9.1.4pre) Gecko/20090915 SUSE/3.0b4-3.6 Thunderbird/3.0b4 MIME-Version: 1.0 To: linux-media@vger.kernel.org Subject: [PATCH] cx88: fix setting input when using DVB X-Spam-Score: -4.1 (----) X-Scan-Signature: b3fd1b7db83873469da4aee2b5064825 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, 27 Mar 2010 12:41:53 +0000 (UTC) diff -r -d -N -U4 v4l-dvb-a79dd2ae4d0e.old/linux/drivers/media/video/cx88/cx88-mpeg.c v4l-dvb-a79dd2ae4d0e/linux/drivers/media/video/cx88/cx88-mpeg.c --- v4l-dvb-a79dd2ae4d0e.old/linux/drivers/media/video/cx88/cx88-mpeg.c 2010-03-23 03:39:52.000000000 +0100 +++ v4l-dvb-a79dd2ae4d0e/linux/drivers/media/video/cx88/cx88-mpeg.c 2010-03-23 19:07:26.000000000 +0100 @@ -637,15 +637,24 @@ /* Driver asked for hardware access. */ static int cx8802_request_acquire(struct cx8802_driver *drv) { struct cx88_core *core = drv->core; + unsigned int i; /* Fail a request for hardware if the device is busy. */ if (core->active_type_id != CX88_BOARD_NONE && core->active_type_id != drv->type_id) return -EBUSY; - core->input = CX88_VMUX_DVB; + core->input = 0; + for (i = 0; + i < (sizeof(core->board.input) / sizeof(struct cx88_input)); + i++) { + if (core->board.input[i].type == CX88_VMUX_DVB) { + core->input = i; + break; + } + } if (drv->advise_acquire) { mutex_lock(&drv->core->lock);