Skip to content

Commit

Permalink
dvb_net: Simplify the code if DVB NET is not defined
Browse files Browse the repository at this point in the history
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
  • Loading branch information
Mauro Carvalho Chehab committed Jul 27, 2011
1 parent a34ff6c commit fcc8e7d
Showing 1 changed file with 3 additions and 10 deletions.
13 changes: 3 additions & 10 deletions drivers/media/dvb/dvb-core/dvb_net.h
Original file line number Diff line number Diff line change
Expand Up @@ -42,32 +42,25 @@ struct dvb_net {
struct dmx_demux *demux;
};


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;
#else

struct dvb_net {
struct dvb_dev_stub *dvbdev;
struct dvb_device *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 /* ifdef CONFIG_DVB_NET */

#endif

0 comments on commit fcc8e7d

Please sign in to comment.