From: anton Date: Sat, 26 Nov 2022 06:29:24 +0000 (+0000) Subject: Pave the way for checking presence of more features in X-Git-Url: http://artulab.com/gitweb/?a=commitdiff_plain;h=15ee81a1ec175ec8f0c4789efe009d08778dec5a;p=openbsd Pave the way for checking presence of more features in uhidpp_device_features(). --- 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 @@ -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; }