summaryrefslogtreecommitdiff
path: root/sys/dev/usb/usb_dev.c
diff options
context:
space:
mode:
authorHans Petter Selasky <hselasky@FreeBSD.org>2012-04-02 10:50:42 +0000
committerHans Petter Selasky <hselasky@FreeBSD.org>2012-04-02 10:50:42 +0000
commit6d917491f5e4d12a9c833584e66600486ec55a09 (patch)
tree70a9d586e75b3d8e087069f07020564df44b0b99 /sys/dev/usb/usb_dev.c
parent120a742b8682f4974f143fa9b020f53ba92864a5 (diff)
Notes
Diffstat (limited to 'sys/dev/usb/usb_dev.c')
-rw-r--r--sys/dev/usb/usb_dev.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/sys/dev/usb/usb_dev.c b/sys/dev/usb/usb_dev.c
index 2b99036410fa..a136dcde8b8b 100644
--- a/sys/dev/usb/usb_dev.c
+++ b/sys/dev/usb/usb_dev.c
@@ -1653,7 +1653,7 @@ usb_fifo_check_methods(struct usb_fifo_methods *pm)
int
usb_fifo_attach(struct usb_device *udev, void *priv_sc,
struct mtx *priv_mtx, struct usb_fifo_methods *pm,
- struct usb_fifo_sc *f_sc, uint16_t unit, uint16_t subunit,
+ struct usb_fifo_sc *f_sc, uint16_t unit, int16_t subunit,
uint8_t iface_index, uid_t uid, gid_t gid, int mode)
{
struct usb_fifo *f_tx;
@@ -1730,7 +1730,7 @@ usb_fifo_attach(struct usb_device *udev, void *priv_sc,
if (pm->basename[n] == NULL) {
continue;
}
- if (subunit == 0xFFFF) {
+ if (subunit < 0) {
if (snprintf(devname, sizeof(devname),
"%s%u%s", pm->basename[n],
unit, pm->postfix[n] ?
@@ -1739,7 +1739,7 @@ usb_fifo_attach(struct usb_device *udev, void *priv_sc,
}
} else {
if (snprintf(devname, sizeof(devname),
- "%s%u.%u%s", pm->basename[n],
+ "%s%u.%d%s", pm->basename[n],
unit, subunit, pm->postfix[n] ?
pm->postfix[n] : "")) {
/* ignore */