diff options
author | Mauro Carvalho Chehab <mchehab@kernel.org> | 2022-03-28 22:41:16 +0200 |
---|---|---|
committer | Mauro Carvalho Chehab <mchehab@kernel.org> | 2022-04-18 07:36:43 +0200 |
commit | 82a4a3ba3380bafc33f58c9b8057bb6577a7f113 (patch) | |
tree | 37c42f0b8667e70ff34222300361e02e7316496a /include/media/dvb-usb-ids.h | |
parent | 7c33d85fed4b470295f9f57a44649249c066b892 (diff) | |
download | linux-stable-82a4a3ba3380bafc33f58c9b8057bb6577a7f113.tar.gz linux-stable-82a4a3ba3380bafc33f58c9b8057bb6577a7f113.tar.bz2 linux-stable-82a4a3ba3380bafc33f58c9b8057bb6577a7f113.zip |
media: dvb-usb: Add helper macros for using USB VID/PID
In order to use designated initializers and to avoid avoid big lines
at the USB ID tables, define some helper macros.
Link: https://lore.kernel.org/linux-media/f82e376dea2e9b922f51a03d1e7730b03e49cc7d.1648499509.git.mchehab@kernel.org
Signed-off-by: Mauro Carvalho Chehab <mchehab@kernel.org>
Diffstat (limited to 'include/media/dvb-usb-ids.h')
-rw-r--r-- | include/media/dvb-usb-ids.h | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/include/media/dvb-usb-ids.h b/include/media/dvb-usb-ids.h index 9577cae8c73b..5ae55c20912e 100644 --- a/include/media/dvb-usb-ids.h +++ b/include/media/dvb-usb-ids.h @@ -10,6 +10,14 @@ #ifndef _DVB_USB_IDS_H_ #define _DVB_USB_IDS_H_ +#include <linux/usb.h> + +#define DVB_USB_DEV(pid, vid) \ + [vid] = { USB_DEVICE(USB_VID_ ## pid, USB_PID_ ## vid) } + +#define DVB_USB_DEV_VER(pid, vid, lo, hi) \ + [vid] = { USB_DEVICE_VER(USB_VID_ ## pid, USB_PID_ ## vid, lo, hi) } + /* Vendor IDs */ #define USB_VID_774 0x7a69 |