summaryrefslogtreecommitdiff
path: root/sys/dev/usb/udcf.c
diff options
context:
space:
mode:
authorJasper Lievisse Adriaanse <jasper@cvs.openbsd.org>2010-12-17 21:53:35 +0000
committerJasper Lievisse Adriaanse <jasper@cvs.openbsd.org>2010-12-17 21:53:35 +0000
commitf90a2c56da97da2907278a6797235ca0f13bdfd5 (patch)
tree0e0b5048310d832aaf149cfcf84e69baf688c8c7 /sys/dev/usb/udcf.c
parentd7cf17489beb3b4a1d7c64cce7bff5b0d21cb540 (diff)
- use usb_lookup() instead of handrolled macro
ok jakemsr@
Diffstat (limited to 'sys/dev/usb/udcf.c')
-rw-r--r--sys/dev/usb/udcf.c8
1 files changed, 3 insertions, 5 deletions
diff --git a/sys/dev/usb/udcf.c b/sys/dev/usb/udcf.c
index 6ae19f8e996..03e556b9aa6 100644
--- a/sys/dev/usb/udcf.c
+++ b/sys/dev/usb/udcf.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: udcf.c,v 1.51 2010/12/06 04:41:40 jakemsr Exp $ */
+/* $OpenBSD: udcf.c,v 1.52 2010/12/17 21:53:34 jasper Exp $ */
/*
* Copyright (c) 2006, 2007, 2008 Marc Balmer <mbalmer@openbsd.org>
@@ -170,10 +170,8 @@ udcf_match(struct device *parent, void *match, void *aux)
if (uaa->iface != NULL)
return UMATCH_NONE;
- if (usb_lookup(udcf_devs, uaa->vendor, uaa->product) == NULL)
- return UMATCH_NONE;
-
- return UMATCH_VENDOR_PRODUCT;
+ return (usb_lookup(udcf_devs, uaa->vendor, uaa->product) != NULL ?
+ UMATCH_VENDOR_PRODUCT : UMATCH_NONE);
}
void