aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorVladimir Kondratyev <wulf@FreeBSD.org>2021-08-24 22:59:17 +0000
committerVladimir Kondratyev <wulf@FreeBSD.org>2021-08-24 22:59:17 +0000
commit9fa1201d60dc7004f11d950f0fbd277bdcdcaf2d (patch)
treeb75d9978b18a2ad9486957402c72fb330a6c4e55
parentd056693d7bc6c1b5f2c1612e5b34807f173e21c7 (diff)
downloadsrc-9fa1201d60dc7004f11d950f0fbd277bdcdcaf2d.tar.gz
src-9fa1201d60dc7004f11d950f0fbd277bdcdcaf2d.zip
atp(4), wsp(4): Return correct priority from probe() method;
MFC after: 2 weeks
-rw-r--r--sys/dev/usb/input/atp.c4
-rw-r--r--sys/dev/usb/input/wsp.c5
2 files changed, 6 insertions, 3 deletions
diff --git a/sys/dev/usb/input/atp.c b/sys/dev/usb/input/atp.c
index 3515c08a1a6d..585afbaf1a1b 100644
--- a/sys/dev/usb/input/atp.c
+++ b/sys/dev/usb/input/atp.c
@@ -2175,11 +2175,11 @@ atp_probe(device_t self)
if ((usbd_lookup_id_by_uaa(fg_devs, sizeof(fg_devs), uaa)) == 0)
return ((uaa->info.bInterfaceProtocol == UIPROTO_MOUSE) ?
- 0 : ENXIO);
+ BUS_PROBE_DEFAULT : ENXIO);
if ((usbd_lookup_id_by_uaa(wsp_devs, sizeof(wsp_devs), uaa)) == 0)
if (uaa->info.bIfaceIndex == WELLSPRING_INTERFACE_INDEX)
- return (0);
+ return (BUS_PROBE_DEFAULT);
return (ENXIO);
}
diff --git a/sys/dev/usb/input/wsp.c b/sys/dev/usb/input/wsp.c
index c44c4aceb308..0c449726d916 100644
--- a/sys/dev/usb/input/wsp.c
+++ b/sys/dev/usb/input/wsp.c
@@ -720,7 +720,10 @@ wsp_probe(device_t self)
/* check if we are attaching to the first match */
if (uaa->info.bIfaceIndex != i)
return (ENXIO);
- return (usbd_lookup_id_by_uaa(wsp_devs, sizeof(wsp_devs), uaa));
+ if (usbd_lookup_id_by_uaa(wsp_devs, sizeof(wsp_devs), uaa) != 0)
+ return (ENXIO);
+
+ return (BUS_PROBE_DEFAULT);
}
static int