Skip to content

Commit

Permalink
[media] Make DVB NET configurable in the kernel
Browse files Browse the repository at this point in the history
Signed-off-by: Hans Petter Selasky <hselasky@c2i.net>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
  • Loading branch information
Hans Petter Selasky authored and Mauro Carvalho Chehab committed Jul 27, 2011
1 parent 4522e82 commit a34ff6c
Show file tree
Hide file tree
Showing 3 changed files with 40 additions and 2 deletions.
12 changes: 11 additions & 1 deletion drivers/media/Kconfig
Expand Up @@ -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.
Expand All @@ -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)
Expand Down
4 changes: 3 additions & 1 deletion drivers/media/dvb/dvb-core/Makefile
Expand Up @@ -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
26 changes: 26 additions & 0 deletions drivers/media/dvb/dvb-core/dvb_net.h
Expand Up @@ -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];
Expand All @@ -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

0 comments on commit a34ff6c

Please sign in to comment.