From patchwork Sun Jan 2 12:06:00 2011 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Igor M. Liplianin" X-Patchwork-Id: 5410 Return-path: Envelope-to: mchehab@gaivota Delivery-date: Sun, 02 Jan 2011 10:49:09 -0200 Received: from mchehab by gaivota with local (Exim 4.72) (envelope-from ) id 1PZNMz-0007SV-98 for mchehab@gaivota; Sun, 02 Jan 2011 10:49:09 -0200 Received: from casper.infradead.org [85.118.1.10] by gaivota with IMAP (fetchmail-6.3.17) for (single-drop); Sun, 02 Jan 2011 10:49:09 -0200 (BRST) Received: from vger.kernel.org ([209.132.180.67]) by casper.infradead.org with esmtp (Exim 4.72 #1 (Red Hat Linux)) id 1PZNGb-0000ou-QM; Sun, 02 Jan 2011 12:42:34 +0000 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754581Ab1ABMl3 (ORCPT + 1 other); Sun, 2 Jan 2011 07:41:29 -0500 Received: from mail-ey0-f194.google.com ([209.85.215.194]:44106 "EHLO mail-ey0-f194.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753348Ab1ABMki (ORCPT ); Sun, 2 Jan 2011 07:40:38 -0500 Received: by mail-ey0-f194.google.com with SMTP id 28so1832069eya.1 for ; Sun, 02 Jan 2011 04:40:37 -0800 (PST) Received: by 10.213.17.205 with SMTP id t13mr16126870eba.75.1293972037505; Sun, 02 Jan 2011 04:40:37 -0800 (PST) Received: from useri.localnet ([93.125.74.3]) by mx.google.com with ESMTPS id b52sm13899177eei.7.2011.01.02.04.40.35 (version=SSLv3 cipher=RC4-MD5); Sun, 02 Jan 2011 04:40:36 -0800 (PST) Message-ID: <4d207244.cc7e0e0a.6f59.3769@mx.google.com> From: "Igor M. Liplianin" Date: Sun, 2 Jan 2011 14:06:00 +0200 Subject: [PATCH 7/9 v2] cx23885: implement num_fds_portb, num_fds_portc parameters for cx23885_board structure. To: , , Precedence: bulk List-ID: X-Mailing-List: linux-media@vger.kernel.org Sender: Mauro Carvalho Chehab This is needed for multifrontend support. NetUP Dual DVB-T/C CI RF card has frontends connected to port B & C Each frontend has two switchable cores - DVB-T & DVB-C Signed-off-by: Igor M. Liplianin --- drivers/media/video/cx23885/cx23885-cards.c | 2 ++ drivers/media/video/cx23885/cx23885-core.c | 4 ++++ drivers/media/video/cx23885/cx23885.h | 1 + 3 files changed, 7 insertions(+), 0 deletions(-) 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 4fa2984..3a09dd2 100644 --- a/drivers/media/video/cx23885/cx23885-core.c +++ b/drivers/media/video/cx23885/cx23885-core.c @@ -1005,6 +1005,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__); @@ -1019,6 +1021,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;