projects
/
openwrt
/
staging
/
blogic.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
1a59001
)
[media] dvb_usb_v2: helper macros for device/adapter/frontend pointers
author
Antti Palosaari
<
[email protected]
>
Sat, 16 Jun 2012 20:58:53 +0000
(17:58 -0300)
committer
Mauro Carvalho Chehab
<
[email protected]
>
Sat, 4 Aug 2012 10:56:34 +0000
(07:56 -0300)
Signed-off-by: Antti Palosaari <
[email protected]
>
Signed-off-by: Mauro Carvalho Chehab <
[email protected]
>
drivers/media/dvb/dvb-usb/dvb_usb.h
patch
|
blob
|
history
diff --git
a/drivers/media/dvb/dvb-usb/dvb_usb.h
b/drivers/media/dvb/dvb-usb/dvb_usb.h
index 56df13fbc05e8918381c8c96e07f6566863018cf..fadc0f988efe3147892885b7dd6f592e468b4203 100644
(file)
--- a/
drivers/media/dvb/dvb-usb/dvb_usb.h
+++ b/
drivers/media/dvb/dvb-usb/dvb_usb.h
@@
-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_, \