diff options
author | Mauro Carvalho Chehab <mchehab@redhat.com> | 2011-06-01 12:03:12 -0400 |
---|---|---|
committer | Mauro Carvalho Chehab <mchehab@redhat.com> | 2011-07-27 16:52:20 -0400 |
commit | fcc8e7d8c0e228cf032de0df049a91d5d2bfd0e9 (patch) | |
tree | e2792d52a145f34eb29c7299885fb9ab34506a83 /drivers/media/dvb | |
parent | a34ff6cdbb464b3e37f0cbb6b0cff9dab4ee057b (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.h | 13 |
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 | |||
46 | void dvb_net_release(struct dvb_net *); | 45 | void dvb_net_release(struct dvb_net *); |
47 | int dvb_net_init(struct dvb_adapter *, struct dvb_net *, struct dmx_demux *); | 46 | int 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 | |||
53 | struct dvb_dev_stub; | ||
54 | 49 | ||
55 | struct dvb_net { | 50 | struct dvb_net { |
56 | struct dvb_dev_stub *dvbdev; | 51 | struct dvb_device *dvbdev; |
57 | }; | 52 | }; |
58 | 53 | ||
59 | static inline void dvb_net_release(struct dvb_net *dvbnet) | 54 | static inline void dvb_net_release(struct dvb_net *dvbnet) |
60 | { | 55 | { |
61 | dvbnet->dvbdev = 0; | ||
62 | } | 56 | } |
63 | 57 | ||
64 | static inline int dvb_net_init(struct dvb_adapter *adap, | 58 | static 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 |