Skip to content

Commit

Permalink
[media] dvb_usb_v2: helper macros for device/adapter/frontend pointers
Browse files Browse the repository at this point in the history
Signed-off-by: Antti Palosaari <crope@iki.fi>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
  • Loading branch information
Antti Palosaari authored and Mauro Carvalho Chehab committed Aug 4, 2012
1 parent 1a59001 commit f89f9ff
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions drivers/media/dvb/dvb-usb/dvb_usb.h
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,14 @@
#include "dmxdev.h"
#include "dvb-usb-ids.h"

/* helper macros for every DVB USB driver use */
#define adap_to_d(adap) ((adap)->dev)
#define adap_to_priv(adap) (adap_to_d(adap)->priv)
#define fe_to_adap(fe) ((struct dvb_usb_adapter *) ((fe)->dvb->priv))
#define fe_to_d(fe) (adap_to_d(fe_to_adap(fe)))
#define fe_to_priv(fe) (fe_to_d(fe)->priv)
#define d_to_priv(d) (d->priv)

#define DVB_USB_STREAM_BULK(endpoint_, count_, size_) { \
.type = USB_BULK, \
.count = count_, \
Expand Down

0 comments on commit f89f9ff

Please sign in to comment.