summaryrefslogtreecommitdiffstats
path: root/sys/dev/usb/usb_dev.c
diff options
context:
space:
mode:
authorhselasky <hselasky@FreeBSD.org>2012-04-02 10:50:42 +0000
committerhselasky <hselasky@FreeBSD.org>2012-04-02 10:50:42 +0000
commit126953ccbe190fe51094d1ccefda3226d1e5140c (patch)
tree70a9d586e75b3d8e087069f07020564df44b0b99 /sys/dev/usb/usb_dev.c
parent56216c3bc99342baf89a814301e85dffe7a62a9b (diff)
downloadFreeBSD-src-126953ccbe190fe51094d1ccefda3226d1e5140c.zip
FreeBSD-src-126953ccbe190fe51094d1ccefda3226d1e5140c.tar.gz
Fix compiler warnings, mostly signed issues,
when USB modules are compiled with WARNS=9. MFC after: 1 weeks
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 2b99036..a136dcd 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 */
OpenPOWER on IntegriCloud