diff options
author | Hans Petter Selasky <hselasky@c2i.net> | 2011-05-23 12:43:35 (GMT) |
---|---|---|
committer | Mauro Carvalho Chehab <mchehab@redhat.com> | 2011-07-27 20:52:20 (GMT) |
commit | a34ff6cdbb464b3e37f0cbb6b0cff9dab4ee057b (patch) | |
tree | 6b770c8f83b3406a497f8a70d9fda98d6d13f0f3 /drivers/media/dvb/dvb-core | |
parent | 4522e825dbfc19537a08f65719dc3d69c46fe661 (diff) | |
download | linux-fsl-qoriq-a34ff6cdbb464b3e37f0cbb6b0cff9dab4ee057b.tar.xz |
[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/dvb-core')
-rw-r--r-- | drivers/media/dvb/dvb-core/Makefile | 4 | ||||
-rw-r--r-- | drivers/media/dvb/dvb-core/dvb_net.h | 26 |
2 files changed, 29 insertions, 1 deletions
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 3a3126ca..cfd2c46 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 |