summaryrefslogtreecommitdiffstats
path: root/sys/dev/usb/serial/uvisor.c
diff options
context:
space:
mode:
authorthompsa <thompsa@FreeBSD.org>2009-12-26 19:03:28 +0000
committerthompsa <thompsa@FreeBSD.org>2009-12-26 19:03:28 +0000
commitd7736702264afdd928eafec9e103477a234c3014 (patch)
tree5c2b4596c3b934547ddc4325e7fb7d533983228b /sys/dev/usb/serial/uvisor.c
parent9cd4207b89f0d656c941fe4a94ea110bd5dafc91 (diff)
downloadFreeBSD-src-d7736702264afdd928eafec9e103477a234c3014.zip
FreeBSD-src-d7736702264afdd928eafec9e103477a234c3014.tar.gz
Use macros to strip off USB_VENDOR_ and USB_PRODUCT_ from some id tables to make
them more compact and readable.
Diffstat (limited to 'sys/dev/usb/serial/uvisor.c')
-rw-r--r--sys/dev/usb/serial/uvisor.c54
1 files changed, 28 insertions, 26 deletions
diff --git a/sys/dev/usb/serial/uvisor.c b/sys/dev/usb/serial/uvisor.c
index 3f1624b..9e6daa9 100644
--- a/sys/dev/usb/serial/uvisor.c
+++ b/sys/dev/usb/serial/uvisor.c
@@ -261,32 +261,34 @@ MODULE_DEPEND(uvisor, ucom, 1, 1, 1);
MODULE_DEPEND(uvisor, usb, 1, 1, 1);
static const struct usb_device_id uvisor_devs[] = {
- {USB_VPI(USB_VENDOR_ACEECA, USB_PRODUCT_ACEECA_MEZ1000, UVISOR_FLAG_PALM4)},
- {USB_VPI(USB_VENDOR_GARMIN, USB_PRODUCT_GARMIN_IQUE_3600, UVISOR_FLAG_PALM4)},
- {USB_VPI(USB_VENDOR_FOSSIL, USB_PRODUCT_FOSSIL_WRISTPDA, UVISOR_FLAG_PALM4)},
- {USB_VPI(USB_VENDOR_HANDSPRING, USB_PRODUCT_HANDSPRING_VISOR, UVISOR_FLAG_VISOR)},
- {USB_VPI(USB_VENDOR_HANDSPRING, USB_PRODUCT_HANDSPRING_TREO, UVISOR_FLAG_PALM4)},
- {USB_VPI(USB_VENDOR_HANDSPRING, USB_PRODUCT_HANDSPRING_TREO600, UVISOR_FLAG_PALM4)},
- {USB_VPI(USB_VENDOR_PALM, USB_PRODUCT_PALM_M500, UVISOR_FLAG_PALM4)},
- {USB_VPI(USB_VENDOR_PALM, USB_PRODUCT_PALM_M505, UVISOR_FLAG_PALM4)},
- {USB_VPI(USB_VENDOR_PALM, USB_PRODUCT_PALM_M515, UVISOR_FLAG_PALM4)},
- {USB_VPI(USB_VENDOR_PALM, USB_PRODUCT_PALM_I705, UVISOR_FLAG_PALM4)},
- {USB_VPI(USB_VENDOR_PALM, USB_PRODUCT_PALM_M125, UVISOR_FLAG_PALM4)},
- {USB_VPI(USB_VENDOR_PALM, USB_PRODUCT_PALM_M130, UVISOR_FLAG_PALM4)},
- {USB_VPI(USB_VENDOR_PALM, USB_PRODUCT_PALM_TUNGSTEN_Z, UVISOR_FLAG_PALM4)},
- {USB_VPI(USB_VENDOR_PALM, USB_PRODUCT_PALM_TUNGSTEN_T, UVISOR_FLAG_PALM4)},
- {USB_VPI(USB_VENDOR_PALM, USB_PRODUCT_PALM_ZIRE, UVISOR_FLAG_PALM4)},
- {USB_VPI(USB_VENDOR_PALM, USB_PRODUCT_PALM_ZIRE31, UVISOR_FLAG_PALM4)},
- {USB_VPI(USB_VENDOR_SAMSUNG, USB_PRODUCT_SAMSUNG_I500, UVISOR_FLAG_PALM4)},
- {USB_VPI(USB_VENDOR_SONY, USB_PRODUCT_SONY_CLIE_40, 0)},
- {USB_VPI(USB_VENDOR_SONY, USB_PRODUCT_SONY_CLIE_41, 0)},
- {USB_VPI(USB_VENDOR_SONY, USB_PRODUCT_SONY_CLIE_S360, UVISOR_FLAG_PALM4)},
- {USB_VPI(USB_VENDOR_SONY, USB_PRODUCT_SONY_CLIE_NX60, UVISOR_FLAG_PALM4)},
- {USB_VPI(USB_VENDOR_SONY, USB_PRODUCT_SONY_CLIE_35, UVISOR_FLAG_PALM35)},
-/* {USB_VPI(USB_VENDOR_SONY, USB_PRODUCT_SONY_CLIE_25, UVISOR_FLAG_PALM4 )}, */
- {USB_VPI(USB_VENDOR_SONY, USB_PRODUCT_SONY_CLIE_TJ37, UVISOR_FLAG_PALM4)},
-/* {USB_VPI(USB_VENDOR_SONY, USB_PRODUCT_SONY_CLIE_TH55, UVISOR_FLAG_PALM4 )}, See PR 80935 */
- {USB_VPI(USB_VENDOR_TAPWAVE, USB_PRODUCT_TAPWAVE_ZODIAC, UVISOR_FLAG_PALM4)},
+#define UVISOR_DEV(v,p,i) { USB_VPI(USB_VENDOR_##v, USB_PRODUCT_##v##_##p, i) }
+ UVISOR_DEV(ACEECA, MEZ1000, UVISOR_FLAG_PALM4),
+ UVISOR_DEV(GARMIN, IQUE_3600, UVISOR_FLAG_PALM4),
+ UVISOR_DEV(FOSSIL, WRISTPDA, UVISOR_FLAG_PALM4),
+ UVISOR_DEV(HANDSPRING, VISOR, UVISOR_FLAG_VISOR),
+ UVISOR_DEV(HANDSPRING, TREO, UVISOR_FLAG_PALM4),
+ UVISOR_DEV(HANDSPRING, TREO600, UVISOR_FLAG_PALM4),
+ UVISOR_DEV(PALM, M500, UVISOR_FLAG_PALM4),
+ UVISOR_DEV(PALM, M505, UVISOR_FLAG_PALM4),
+ UVISOR_DEV(PALM, M515, UVISOR_FLAG_PALM4),
+ UVISOR_DEV(PALM, I705, UVISOR_FLAG_PALM4),
+ UVISOR_DEV(PALM, M125, UVISOR_FLAG_PALM4),
+ UVISOR_DEV(PALM, M130, UVISOR_FLAG_PALM4),
+ UVISOR_DEV(PALM, TUNGSTEN_Z, UVISOR_FLAG_PALM4),
+ UVISOR_DEV(PALM, TUNGSTEN_T, UVISOR_FLAG_PALM4),
+ UVISOR_DEV(PALM, ZIRE, UVISOR_FLAG_PALM4),
+ UVISOR_DEV(PALM, ZIRE31, UVISOR_FLAG_PALM4),
+ UVISOR_DEV(SAMSUNG, I500, UVISOR_FLAG_PALM4),
+ UVISOR_DEV(SONY, CLIE_40, 0),
+ UVISOR_DEV(SONY, CLIE_41, 0),
+ UVISOR_DEV(SONY, CLIE_S360, UVISOR_FLAG_PALM4),
+ UVISOR_DEV(SONY, CLIE_NX60, UVISOR_FLAG_PALM4),
+ UVISOR_DEV(SONY, CLIE_35, UVISOR_FLAG_PALM35),
+/* UVISOR_DEV(SONY, CLIE_25, UVISOR_FLAG_PALM4 ), */
+ UVISOR_DEV(SONY, CLIE_TJ37, UVISOR_FLAG_PALM4),
+/* UVISOR_DEV(SONY, CLIE_TH55, UVISOR_FLAG_PALM4 ), See PR 80935 */
+ UVISOR_DEV(TAPWAVE, ZODIAC, UVISOR_FLAG_PALM4),
+#undef UVISOR_DEV
};
static int
OpenPOWER on IntegriCloud