[lkml]   [2009]   [Jun]   [24]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
Messages in this thread
    Patch in this message
    Subject[PATCH 1/3] Return ENODEV instead of EINVAL when trying to open ACM device.
    This is required, otherwise a user will get a EINVAL while opening a
    non-existing device, instead of ENODEV.

    This is what I get with this patch applied now instead of an "Invalid

    cascardo@vespa:~$ cat /dev/ttyACM0
    cat: /dev/ttyACM0: No such device

    Signed-off-by: Thadeu Lima de Souza Cascardo <>
    drivers/usb/class/cdc-acm.c | 2 +-
    1 files changed, 1 insertions(+), 1 deletions(-)

    diff --git a/drivers/usb/class/cdc-acm.c b/drivers/usb/class/cdc-acm.c
    index 38bfdb0..02eb60b 100644
    --- a/drivers/usb/class/cdc-acm.c
    +++ b/drivers/usb/class/cdc-acm.c
    @@ -550,7 +550,7 @@ static void acm_waker(struct work_struct *waker)
    static int acm_tty_open(struct tty_struct *tty, struct file *filp)
    struct acm *acm;
    - int rv = -EINVAL;
    + int rv = -ENODEV;
    int i;
    dbg("Entering acm_tty_open.");


     \ /
      Last update: 2009-06-24 23:37    [W:0.020 / U:24.048 seconds]
    ©2003-2016 Jasper Spaans. hosted at Digital OceanAdvertise on this site