Re: [PATCH] usbhid: replace inappropriate ENOSYS with ENODEV

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Wed, 20 Jan 2016, Heiner Kallweit wrote:

> Primary meaning of ENOSYS is "system call not available" but it's also used
> with meaning "function not implemented". Both are not applicable here.
> 
> Typically this error occurs when the device was unplugged.
> usbhid_raw_request returns -ENODEV in such a case what seems to be more
> reasonable. Therefore use -ENODEV also here.
> 
> Primary motivation for this change is a change in the LED subsystem to
> ignore -ENODEV if the device was most likely unplugged.

I believe POSIX defines ENOSYS as "Function not implemented". In this 
case, we are signalling there is no "URB OUT" function.

I don't have strong preference either way, but ENODEV doesn't seem to be 
particularly good fit for this purpose either.

-- 
Jiri Kosina
SUSE Labs

--
To unsubscribe from this list: send the line "unsubscribe linux-input" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html



[Index of Archives]     [Linux Media Devel]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [Linux Wireless Networking]     [Linux Omap]

  Powered by Linux