]> pilppa.com Git - linux-2.6-omap-h63xx.git/commitdiff
gigaset: return -ENOTTY for unimplemented functions
authorPaul Bolle <pebolle@tiscali.nl>
Sun, 8 Mar 2009 05:23:13 +0000 (05:23 +0000)
committerDavid S. Miller <davem@davemloft.net>
Tue, 10 Mar 2009 12:22:42 +0000 (05:22 -0700)
A number of functions in the usb_gigaset module will return -EINVAL if
CONFIG_GIGASET_UNDOCREQ is not set. Make these return -ENOTTY as it's
more specific and it might make it easier to see (from userspace) why
these functions actually fail.

Impact: some error return codes changed

Signed-off-by: Paul Bolle <pebolle@tiscali.nl>
Signed-off-by: Tilman Schmidt <tilman@imap.cc>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/isdn/gigaset/usb-gigaset.c

index fba61f6705278250139bc2ac94e51f2409b025f5..d7838516609997b67b41610f3a6d8fca8f2df221 100644 (file)
@@ -278,17 +278,17 @@ static int gigaset_set_line_ctrl(struct cardstate *cs, unsigned cflag)
 static int gigaset_set_modem_ctrl(struct cardstate *cs, unsigned old_state,
                                  unsigned new_state)
 {
-       return -EINVAL;
+       return -ENOTTY;
 }
 
 static int gigaset_set_line_ctrl(struct cardstate *cs, unsigned cflag)
 {
-       return -EINVAL;
+       return -ENOTTY;
 }
 
 static int gigaset_baud_rate(struct cardstate *cs, unsigned cflag)
 {
-       return -EINVAL;
+       return -ENOTTY;
 }
 #endif
 
@@ -577,7 +577,7 @@ static int gigaset_brkchars(struct cardstate *cs, const unsigned char buf[6])
        return usb_control_msg(udev, usb_sndctrlpipe(udev, 0), 0x19, 0x41,
                               0, 0, &buf, 6, 2000);
 #else
-       return -EINVAL;
+       return -ENOTTY;
 #endif
 }