From patchwork Mon May 23 13:11:44 2011 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Hans Petter Selasky X-Patchwork-Id: 808672 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by demeter2.kernel.org (8.14.4/8.14.3) with ESMTP id p4NDCxmG001555 for ; Mon, 23 May 2011 13:12:59 GMT Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753106Ab1EWNM6 (ORCPT ); Mon, 23 May 2011 09:12:58 -0400 Received: from mailfe06.c2i.net ([212.247.154.162]:38476 "EHLO swip.net" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1751531Ab1EWNM5 (ORCPT ); Mon, 23 May 2011 09:12:57 -0400 X-Cloudmark-Score: 0.000000 [] X-Cloudmark-Analysis: v=1.1 cv=NvrFngl24Vvwb7eBef0tfsytOWEnP/WlkqxQrRnklhk= c=1 sm=1 a=UYg-pj87pjUA:10 a=WQU8e4WWZSUA:10 a=CL8lFSKtTFcA:10 a=i9M/sDlu2rpZ9XS819oYzg==:17 a=SObZXD9RMCsnjX8LmoMA:9 a=CjuIK1q_8ugA:10 a=8kQB0OdkAAAA:8 a=qbDJRcqRlXi-hLv0wbgA:9 a=v-2v4eOv9nm-12es0coA:7 a=9aOQ2cSd83gA:10 a=i9M/sDlu2rpZ9XS819oYzg==:117 Received: from [188.126.198.129] (account mc467741@c2i.net HELO laptop002.hselasky.homeunix.org) by mailfe06.swip.net (CommuniGate Pro SMTP 5.2.19) with ESMTPA id 129548110; Mon, 23 May 2011 15:12:55 +0200 To: "linux-media@vger.kernel.org" Subject: [PATCH] Make DVB NET configurable in the kernel. Cc: Mauro Carvalho Chehab From: Hans Petter Selasky X-Face: *nPdTl_}RuAI6^PVpA02T?$%Xa^>@hE0uyUIoiha$pC:9TVgl.Oq,NwSZ4V" =?iso-8859-15?q?=7CLR=2E+tj=7Dg5=0A=09=25V?=,x^qOs~mnU3]Gn; cQLv&.N>TrxmSFf+p6(30a/{)KUU!s}w\IhQBj}[g}bj0I3^glmC( =?iso-8859-15?q?=0A=09=3AAuzV9=3A=2EhESm-x4h240C=609=3Dw?= Date: Mon, 23 May 2011 15:11:44 +0200 MIME-Version: 1.0 Message-Id: <201105231511.44508.hselasky@c2i.net> 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 (demeter2.kernel.org [140.211.167.43]); Mon, 23 May 2011 13:13:00 +0000 (UTC) --HPS From 7222450a9d6f96f652237c65019fb25f54586d01 Mon Sep 17 00:00:00 2001 From: Hans Petter Selasky Date: Mon, 23 May 2011 14:43:35 +0200 Subject: [PATCH] Make DVB NET configurable in the kernel. Signed-off-by: Hans Petter Selasky --- drivers/media/Kconfig | 12 +++++++++++- drivers/media/dvb/dvb-core/Makefile | 4 +++- drivers/media/dvb/dvb-core/dvb_net.h | 26 ++++++++++++++++++++++++++ 3 files changed, 40 insertions(+), 2 deletions(-) diff --git a/drivers/media/Kconfig b/drivers/media/Kconfig index 6995940..dc61895 100644 --- a/drivers/media/Kconfig +++ b/drivers/media/Kconfig @@ -68,7 +68,6 @@ config VIDEO_V4L2_SUBDEV_API config DVB_CORE tristate "DVB for Linux" - depends on NET && INET select CRC32 help DVB core utility functions for device handling, software fallbacks etc. @@ -85,6 +84,17 @@ config DVB_CORE If unsure say N. +config DVB_NET + bool "DVB Network Support" + default (NET && INET) + depends on NET && INET + help + The DVB network support in the DVB core can + optionally be disabled if this + option is set to N. + + If unsure say Y. + config VIDEO_MEDIA tristate default (DVB_CORE && (VIDEO_DEV = n)) || (VIDEO_DEV && (DVB_CORE = n)) || (DVB_CORE && VIDEO_DEV) diff --git a/drivers/media/dvb/dvb-core/Makefile b/drivers/media/dvb/dvb-core/Makefile index 0b51828..8f22bcd 100644 --- a/drivers/media/dvb/dvb-core/Makefile +++ b/drivers/media/dvb/dvb-core/Makefile @@ -2,8 +2,10 @@ # Makefile for the kernel DVB device drivers. # +dvb-net-$(CONFIG_DVB_NET) := dvb_net.o + dvb-core-objs := dvbdev.o dmxdev.o dvb_demux.o dvb_filter.o \ dvb_ca_en50221.o dvb_frontend.o \ - dvb_net.o dvb_ringbuffer.o dvb_math.o + $(dvb-net-y) dvb_ringbuffer.o dvb_math.o obj-$(CONFIG_DVB_CORE) += dvb-core.o diff --git a/drivers/media/dvb/dvb-core/dvb_net.h b/drivers/media/dvb/dvb-core/dvb_net.h index 3a3126c..8a0907f 100644 --- a/drivers/media/dvb/dvb-core/dvb_net.h +++ b/drivers/media/dvb/dvb-core/dvb_net.h @@ -32,6 +32,8 @@ #define DVB_NET_DEVICES_MAX 10 +#ifdef CONFIG_DVB_NET + struct dvb_net { struct dvb_device *dvbdev; struct net_device *device[DVB_NET_DEVICES_MAX]; @@ -45,3 +47,27 @@ void dvb_net_release(struct dvb_net *); int dvb_net_init(struct dvb_adapter *, struct dvb_net *, struct dmx_demux *); #endif + +#ifndef CONFIG_DVB_NET + +struct dvb_dev_stub; + +struct dvb_net { + struct dvb_dev_stub *dvbdev; +}; + +static inline void dvb_net_release(struct dvb_net *dvbnet) +{ + dvbnet->dvbdev = 0; +} + +static inline int dvb_net_init(struct dvb_adapter *adap, + struct dvb_net *dvbnet, struct dmx_demux *dmx) +{ + dvbnet->dvbdev = (void *)1; + return 0; +} + +#endif + +#endif -- 1.7.1.1