diff options
Diffstat (limited to 'sys/dev/usb')
-rw-r--r-- | sys/dev/usb/uhidpp.c | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/sys/dev/usb/uhidpp.c b/sys/dev/usb/uhidpp.c index a0c470d906c..174b59361b6 100644 --- a/sys/dev/usb/uhidpp.c +++ b/sys/dev/usb/uhidpp.c @@ -1,4 +1,4 @@ -/* $OpenBSD: uhidpp.c,v 1.25 2022/01/26 06:05:59 anton Exp $ */ +/* $OpenBSD: uhidpp.c,v 1.26 2022/02/05 07:31:40 anton Exp $ */ /* * Copyright (c) 2021 Anton Lindqvist <anton@openbsd.org> @@ -637,6 +637,13 @@ uhidpp_device_connect(struct uhidpp_softc *sc, struct uhidpp_device *dev) uhidpp_device_refresh(sc, dev); + /* + * There could be many devices connected to the same receiver, therefore + * only install the sensors once. + */ + if (uhidpp_has_sensors(sc)) + return; + strlcpy(sc->sc_sensdev.xname, sc->sc_hdev.sc_dev.dv_xname, sizeof(sc->sc_sensdev.xname)); sensordev_install(&sc->sc_sensdev); |