From patchwork Tue Jan 25 20: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: 506891 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 p0PKoZDD006763 for ; Tue, 25 Jan 2011 20:51:09 GMT Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753882Ab1AYUts (ORCPT ); Tue, 25 Jan 2011 15:49:48 -0500 Received: from mail-ey0-f174.google.com ([209.85.215.174]:58419 "EHLO mail-ey0-f174.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753706Ab1AYUtp (ORCPT ); Tue, 25 Jan 2011 15:49:45 -0500 Received: by eye27 with SMTP id 27so173192eye.19 for ; Tue, 25 Jan 2011 12:49:44 -0800 (PST) Received: by 10.213.31.209 with SMTP id z17mr162719ebc.12.1295988583905; Tue, 25 Jan 2011 12:49:43 -0800 (PST) Received: from useri.localnet ([93.125.74.3]) by mx.google.com with ESMTPS id t5sm11419593eeh.20.2011.01.25.12.49.41 (version=SSLv3 cipher=RC4-MD5); Tue, 25 Jan 2011 12:49:42 -0800 (PST) Message-ID: <4d3f3766.857a0e0a.122c.478f@mx.google.com> From: "Igor M. Liplianin" Date: Tue, 25 Jan 2011 22:06:00 +0200 Subject: [PATCH 7/9 v3] cx23885: implement num_fds_portb, num_fds_portc parameters for cx23885_board structure. To: , , 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.6 (demeter1.kernel.org [140.211.167.41]); Tue, 25 Jan 2011 20:51:10 +0000 (UTC) diff --git a/drivers/media/video/cx23885/cx23885-cards.c b/drivers/media/video/cx23885/cx23885-cards.c index fb2045a..ea88722 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 d621d76..d778b1a 100644 --- a/drivers/media/video/cx23885/cx23885-core.c +++ b/drivers/media/video/cx23885/cx23885-core.c @@ -1005,6 +1005,9 @@ 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 +1022,9 @@ 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 d8c76b0..8db2797 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;