From 8a5492b8817dbd1a0a609dec51e486e75c330843 Mon Sep 17 00:00:00 2001 From: Warner Losh Date: Sun, 31 Aug 2008 03:16:31 +0000 Subject: [PATCH] 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. --- sys/dev/usb/umodem.c | 16 +++++++--------- 1 file changed, 7 insertions(+), 9 deletions(-) diff --git a/sys/dev/usb/umodem.c b/sys/dev/usb/umodem.c index 89b3e050638..019304b86d8 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; }