summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorimp <imp@FreeBSD.org>2008-08-31 03:16:31 +0000
committerimp <imp@FreeBSD.org>2008-08-31 03:16:31 +0000
commit4e578abd6f1ec67618699e749e2e7721145bd76f (patch)
tree2e4cf718537e5212dfa69142c6a90abb480efcfc
parentd83d65fc146e49c218009123d792b6cfa58550a0 (diff)
downloadFreeBSD-src-4e578abd6f1ec67618699e749e2e7721145bd76f.zip
FreeBSD-src-4e578abd6f1ec67618699e749e2e7721145bd76f.tar.gz
Ioctls that aren't handled by this layer need to return ENOIOCTL, not
ENOTTY. Also, make the ucom callback structure easier to read while I'm here.
-rw-r--r--sys/dev/usb/umodem.c16
1 files changed, 7 insertions, 9 deletions
diff --git a/sys/dev/usb/umodem.c b/sys/dev/usb/umodem.c
index 89b3e05..019304b 100644
--- a/sys/dev/usb/umodem.c
+++ b/sys/dev/usb/umodem.c
@@ -194,14 +194,12 @@ static void umodem_intr(usbd_xfer_handle, usbd_private_handle, usbd_status);
static void umodem_notify(void *, int);
static struct ucom_callback umodem_callback = {
- umodem_get_status,
- umodem_set,
- umodem_param,
- umodem_ioctl,
- umodem_open,
- umodem_close,
- NULL,
- NULL,
+ .ucom_get_status = umodem_get_status,
+ .ucom_set = umodem_set,
+ .ucom_param = umodem_param,
+ .ucom_ioctl = umodem_ioctl,
+ .ucom_open = umodem_open,
+ .ucom_close = umodem_close
};
static device_probe_t umodem_match;
@@ -635,7 +633,7 @@ umodem_ioctl(void *addr, int portno, u_long cmd, caddr_t data,
default:
DPRINTF(("umodemioctl: unknown\n"));
- error = ENOTTY;
+ error = ENOIOCTL;
break;
}
OpenPOWER on IntegriCloud