[media] dvb_usb_v2: add macro for filling usb_device_id table entry
authorAntti Palosaari <crope@iki.fi>
Mon, 4 Jun 2012 23:12:55 +0000 (20:12 -0300)
committerMauro Carvalho Chehab <mchehab@redhat.com>
Sat, 4 Aug 2012 10:56:25 +0000 (07:56 -0300)
Signed-off-by: Antti Palosaari <crope@iki.fi>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
drivers/media/dvb/dvb-usb/dvb_usb.h

index 4aa5bd190aece95930f0df4cf88d1c6d9c4bc1a1..e90d81f7e3d06cda47867c3f76f2e32edae24e99 100644 (file)
@@ -66,6 +66,16 @@ struct dvb_usb_driver_info {
        const struct dvb_usb_device_properties *props;
 };
 
+#define DVB_USB_DEVICE(vend, prod, props_, name_, rc) \
+       .match_flags = USB_DEVICE_ID_MATCH_DEVICE, \
+       .idVendor = (vend), \
+       .idProduct = (prod), \
+       .driver_info = (kernel_ulong_t) &((struct dvb_usb_driver_info) { \
+               .props = (props_), \
+               .name = (name_), \
+               .rc_map = (rc), \
+       })
+
 struct dvb_usb_device;
 struct dvb_usb_adapter;
 struct usb_data_stream;