summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAnton Lindqvist <anton@cvs.openbsd.org>2022-11-26 06:29:25 +0000
committerAnton Lindqvist <anton@cvs.openbsd.org>2022-11-26 06:29:25 +0000
commita4c5f6ec24f6374aa9d73789f6a45a4ac71f8649 (patch)
treee9699472918de189b0a1b3176c2b70802227ad55
parentfba722569fa4ab66fabd7de771b741117cc6acb9 (diff)
Pave the way for checking presence of more features in
uhidpp_device_features().
-rw-r--r--sys/dev/usb/uhidpp.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/sys/dev/usb/uhidpp.c b/sys/dev/usb/uhidpp.c
index 319e28f89f4..370799ff0b5 100644
--- a/sys/dev/usb/uhidpp.c
+++ b/sys/dev/usb/uhidpp.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: uhidpp.c,v 1.34 2022/11/26 06:29:07 anton Exp $ */
+/* $OpenBSD: uhidpp.c,v 1.35 2022/11/26 06:29:24 anton Exp $ */
/*
* Copyright (c) 2021 Anton Lindqvist <anton@openbsd.org>
@@ -732,7 +732,7 @@ uhidpp_device_features(struct uhidpp_softc *sc, struct uhidpp_device *dev)
DPRINTF("%s: device_id=%d, count=%d, features=%x\n",
__func__, dev->d_id, count, dev->d_features);
- if ((dev->d_features & UHIDPP_DEVICE_FEATURE_BATTERY) == 0)
+ if ((dev->d_features & ~UHIDPP_DEVICE_FEATURE_ROOT) == 0)
return -ENODEV;
return 0;
}