aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/media/dvb
diff options
context:
space:
mode:
authorMauro Carvalho Chehab <mchehab@redhat.com>2011-06-01 12:03:12 -0400
committerMauro Carvalho Chehab <mchehab@redhat.com>2011-07-27 16:52:20 -0400
commitfcc8e7d8c0e228cf032de0df049a91d5d2bfd0e9 (patch)
treee2792d52a145f34eb29c7299885fb9ab34506a83 /drivers/media/dvb
parenta34ff6cdbb464b3e37f0cbb6b0cff9dab4ee057b (diff)
dvb_net: Simplify the code if DVB NET is not defined
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Diffstat (limited to 'drivers/media/dvb')
-rw-r--r--drivers/media/dvb/dvb-core/dvb_net.h13
1 files changed, 3 insertions, 10 deletions
diff --git a/drivers/media/dvb/dvb-core/dvb_net.h b/drivers/media/dvb/dvb-core/dvb_net.h
index cfd2c46bd5d9..1e53acd50cf4 100644
--- a/drivers/media/dvb/dvb-core/dvb_net.h
+++ b/drivers/media/dvb/dvb-core/dvb_net.h
@@ -42,32 +42,25 @@ struct dvb_net {
42 struct dmx_demux *demux; 42 struct dmx_demux *demux;
43}; 43};
44 44
45
46void dvb_net_release(struct dvb_net *); 45void dvb_net_release(struct dvb_net *);
47int dvb_net_init(struct dvb_adapter *, struct dvb_net *, struct dmx_demux *); 46int dvb_net_init(struct dvb_adapter *, struct dvb_net *, struct dmx_demux *);
48 47
49#endif 48#else
50
51#ifndef CONFIG_DVB_NET
52
53struct dvb_dev_stub;
54 49
55struct dvb_net { 50struct dvb_net {
56 struct dvb_dev_stub *dvbdev; 51 struct dvb_device *dvbdev;
57}; 52};
58 53
59static inline void dvb_net_release(struct dvb_net *dvbnet) 54static inline void dvb_net_release(struct dvb_net *dvbnet)
60{ 55{
61 dvbnet->dvbdev = 0;
62} 56}
63 57
64static inline int dvb_net_init(struct dvb_adapter *adap, 58static inline int dvb_net_init(struct dvb_adapter *adap,
65 struct dvb_net *dvbnet, struct dmx_demux *dmx) 59 struct dvb_net *dvbnet, struct dmx_demux *dmx)
66{ 60{
67 dvbnet->dvbdev = (void *)1;
68 return 0; 61 return 0;
69} 62}
70 63
71#endif 64#endif /* ifdef CONFIG_DVB_NET */
72 65
73#endif 66#endif