From patchwork Tue Aug 17 10:10:07 2010 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Igor M. Liplianin" X-Patchwork-Id: 441921 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by demeter1.kernel.org (8.14.4/8.14.3) with ESMTP id oBV5Xs9a016019 for ; Fri, 31 Dec 2010 05:33:54 GMT Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751671Ab0LaFcH (ORCPT ); Fri, 31 Dec 2010 00:32:07 -0500 Received: from mail-ew0-f46.google.com ([209.85.215.46]:62090 "EHLO mail-ew0-f46.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751235Ab0LaFcG (ORCPT ); Fri, 31 Dec 2010 00:32:06 -0500 Received: by ewy5 with SMTP id 5so5311700ewy.19 for ; Thu, 30 Dec 2010 21:32:04 -0800 (PST) Received: by 10.14.17.193 with SMTP id j41mr9569007eej.38.1293773524572; Thu, 30 Dec 2010 21:32:04 -0800 (PST) Received: from useri.localnet ([93.125.74.3]) by mx.google.com with ESMTPS id t5sm11994271eeh.8.2010.12.30.21.32.03 (version=SSLv3 cipher=RC4-MD5); Thu, 30 Dec 2010 21:32:03 -0800 (PST) Message-ID: <4d1d6ad3.857a0e0a.45e5.ffffd919@mx.google.com> From: "Igor M. Liplianin" Date: Tue, 17 Aug 2010 13:10:07 +0300 Subject: [PATCH 07/18] cx23885: implement num_fds_portb, num_fds_portc parameters for cx23885_board structure. 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 (demeter1.kernel.org [140.211.167.41]); Fri, 31 Dec 2010 05:33:54 +0000 (UTC) diff --git a/drivers/media/video/cx23885/cx23885-cards.c b/drivers/media/video/cx23885/cx23885-cards.c index 7de6379..461413a 100644 --- a/drivers/media/video/cx23885/cx23885-cards.c +++ b/drivers/media/video/cx23885/cx23885-cards.c @@ -344,6 +344,8 @@ struct cx23885_board cx23885_boards[] = { .porta = CX23885_ANALOG_VIDEO, .portb = CX23885_MPEG_DVB, .portc = CX23885_MPEG_DVB, + .num_fds_portb = 2, + .num_fds_portc = 2, .tuner_type = TUNER_XC5000, .tuner_addr = 0x64, .input = { { diff --git a/drivers/media/video/cx23885/cx23885-core.c b/drivers/media/video/cx23885/cx23885-core.c index a5998dd..307eaf4 100644 --- a/drivers/media/video/cx23885/cx23885-core.c +++ b/drivers/media/video/cx23885/cx23885-core.c @@ -1011,6 +1011,8 @@ static int cx23885_dev_setup(struct cx23885_dev *dev) } if (cx23885_boards[dev->board].portb == CX23885_MPEG_DVB) { + if (cx23885_boards[dev->board].num_fds_portb) + dev->ts1.num_frontends = cx23885_boards[dev->board].num_fds_portb; if (cx23885_dvb_register(&dev->ts1) < 0) { printk(KERN_ERR "%s() Failed to register dvb adapters on VID_B\n", __func__); @@ -1025,6 +1027,8 @@ static int cx23885_dev_setup(struct cx23885_dev *dev) } if (cx23885_boards[dev->board].portc == CX23885_MPEG_DVB) { + if (cx23885_boards[dev->board].num_fds_portc) + dev->ts2.num_frontends = cx23885_boards[dev->board].num_fds_portc; if (cx23885_dvb_register(&dev->ts2) < 0) { printk(KERN_ERR "%s() Failed to register dvb on VID_C\n", diff --git a/drivers/media/video/cx23885/cx23885.h b/drivers/media/video/cx23885/cx23885.h index d43f80b..e678667 100644 --- a/drivers/media/video/cx23885/cx23885.h +++ b/drivers/media/video/cx23885/cx23885.h @@ -205,6 +205,7 @@ typedef enum { struct cx23885_board { char *name; port_t porta, portb, portc; + int num_fds_portb, num_fds_portc; unsigned int tuner_type; unsigned int radio_type; unsigned char tuner_addr;