aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/media/dvb
diff options
context:
space:
mode:
authorHans Petter Selasky <hselasky@c2i.net>2011-05-23 08:43:35 -0400
committerMauro Carvalho Chehab <mchehab@redhat.com>2011-07-27 16:52:20 -0400
commita34ff6cdbb464b3e37f0cbb6b0cff9dab4ee057b (patch)
tree6b770c8f83b3406a497f8a70d9fda98d6d13f0f3 /drivers/media/dvb
parent4522e825dbfc19537a08f65719dc3d69c46fe661 (diff)
[media] Make DVB NET configurable in the kernel
Signed-off-by: Hans Petter Selasky <hselasky@c2i.net> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Diffstat (limited to 'drivers/media/dvb')
-rw-r--r--drivers/media/dvb/dvb-core/Makefile4
-rw-r--r--drivers/media/dvb/dvb-core/dvb_net.h26
2 files changed, 29 insertions, 1 deletions
diff --git a/drivers/media/dvb/dvb-core/Makefile b/drivers/media/dvb/dvb-core/Makefile
index 0b5182835cc8..8f22bcd7c1f9 100644
--- a/drivers/media/dvb/dvb-core/Makefile
+++ b/drivers/media/dvb/dvb-core/Makefile
@@ -2,8 +2,10 @@
2# Makefile for the kernel DVB device drivers. 2# Makefile for the kernel DVB device drivers.
3# 3#
4 4
5dvb-net-$(CONFIG_DVB_NET) := dvb_net.o
6
5dvb-core-objs := dvbdev.o dmxdev.o dvb_demux.o dvb_filter.o \ 7dvb-core-objs := dvbdev.o dmxdev.o dvb_demux.o dvb_filter.o \
6 dvb_ca_en50221.o dvb_frontend.o \ 8 dvb_ca_en50221.o dvb_frontend.o \
7 dvb_net.o dvb_ringbuffer.o dvb_math.o 9 $(dvb-net-y) dvb_ringbuffer.o dvb_math.o
8 10
9obj-$(CONFIG_DVB_CORE) += dvb-core.o 11obj-$(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 3a3126cae03b..cfd2c46bd5d9 100644
--- a/drivers/media/dvb/dvb-core/dvb_net.h
+++ b/drivers/media/dvb/dvb-core/dvb_net.h
@@ -32,6 +32,8 @@
32 32
33#define DVB_NET_DEVICES_MAX 10 33#define DVB_NET_DEVICES_MAX 10
34 34
35#ifdef CONFIG_DVB_NET
36
35struct dvb_net { 37struct dvb_net {
36 struct dvb_device *dvbdev; 38 struct dvb_device *dvbdev;
37 struct net_device *device[DVB_NET_DEVICES_MAX]; 39 struct net_device *device[DVB_NET_DEVICES_MAX];
@@ -45,3 +47,27 @@ void dvb_net_release(struct dvb_net *);
45int dvb_net_init(struct dvb_adapter *, struct dvb_net *, struct dmx_demux *); 47int dvb_net_init(struct dvb_adapter *, struct dvb_net *, struct dmx_demux *);
46 48
47#endif 49#endif
50
51#ifndef CONFIG_DVB_NET
52
53struct dvb_dev_stub;
54
55struct dvb_net {
56 struct dvb_dev_stub *dvbdev;
57};
58
59static inline void dvb_net_release(struct dvb_net *dvbnet)
60{
61 dvbnet->dvbdev = 0;
62}
63
64static inline int dvb_net_init(struct dvb_adapter *adap,
65 struct dvb_net *dvbnet, struct dmx_demux *dmx)
66{
67 dvbnet->dvbdev = (void *)1;
68 return 0;
69}
70
71#endif
72
73#endif