Misc: Cleanup across multiple backends
authorChris Dickens <christopher.a.dickens@gmail.com>
Thu, 23 Jan 2020 00:59:25 +0000 (16:59 -0800)
committerChris Dickens <christopher.a.dickens@gmail.com>
Fri, 24 Jan 2020 19:21:36 +0000 (11:21 -0800)
commit5c7ddb5ddf1fe1d9f8c68e7deefe3bd53e1e3e8c
tree15dc34f45c1414e9a658775868090a7eb67cb1b9
parentaaff15d48d1b8555aabf012b06bf39bf8aa4768a
Misc: Cleanup across multiple backends

Remove the clear_transfer_priv() function from all backends besides
Linux. This function is only needed if the backend calls
usbi_handle_disconnect(), which only Linux does.

Remove the {attach,detach}_kernel_driver() functions from the Darwin
backend. They return LIBUSB_ERROR_NOT_SUPPORTED, but the same result is
achieved by having those functions be NULL.

Remove the init() and exit() functions from the SunOS backend. They are
optional and as no-ops are pointless.

Remove NULL and 0 initializers from usbi_backend structures.

Use named initializers in the NetBSD backend.

Signed-off-by: Chris Dickens <christopher.a.dickens@gmail.com>
libusb/os/darwin_usb.c
libusb/os/haiku_usb_raw.cpp
libusb/os/linux_usbfs.c
libusb/os/netbsd_usb.c
libusb/os/null_usb.c
libusb/os/openbsd_usb.c
libusb/os/sunos_usb.c
libusb/os/windows_common.c
libusb/version_nano.h