提交 fcc8e7d8 编写于 作者: M Mauro Carvalho Chehab

dvb_net: Simplify the code if DVB NET is not defined

Signed-off-by: NMauro Carvalho Chehab <mchehab@redhat.com>
上级 a34ff6cd
...@@ -42,32 +42,25 @@ struct dvb_net { ...@@ -42,32 +42,25 @@ struct dvb_net {
struct dmx_demux *demux; struct dmx_demux *demux;
}; };
void dvb_net_release(struct dvb_net *); void dvb_net_release(struct dvb_net *);
int dvb_net_init(struct dvb_adapter *, struct dvb_net *, struct dmx_demux *); int dvb_net_init(struct dvb_adapter *, struct dvb_net *, struct dmx_demux *);
#endif #else
#ifndef CONFIG_DVB_NET
struct dvb_dev_stub;
struct dvb_net { struct dvb_net {
struct dvb_dev_stub *dvbdev; struct dvb_device *dvbdev;
}; };
static inline void dvb_net_release(struct dvb_net *dvbnet) static inline void dvb_net_release(struct dvb_net *dvbnet)
{ {
dvbnet->dvbdev = 0;
} }
static inline int dvb_net_init(struct dvb_adapter *adap, static inline int dvb_net_init(struct dvb_adapter *adap,
struct dvb_net *dvbnet, struct dmx_demux *dmx) struct dvb_net *dvbnet, struct dmx_demux *dmx)
{ {
dvbnet->dvbdev = (void *)1;
return 0; return 0;
} }
#endif #endif /* ifdef CONFIG_DVB_NET */
#endif #endif
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册