staging: usbip: convert usbip-host driver to usb_device_driver
authorValentina Manea <valentina.manea.m@gmail.com>
Thu, 23 Jan 2014 21:12:29 +0000 (23:12 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Fri, 7 Feb 2014 18:54:30 +0000 (10:54 -0800)
commitb7945b77cd03094458f3624bc82a27e0d36e75d0
tree55fa77ff4d051b90a69e2fca601dea3c3c7562c1
parenta6646ea683c0c73962cb67aea9be40b11b916de5
staging: usbip: convert usbip-host driver to usb_device_driver

This driver was previously an interface driver. Since USB/IP
exports a whole device, not just an interface, it would make
sense to be a device driver.

This patch also modifies the way userspace sees and uses a
shared device:

* the usbip_status file is no longer created for interface 0, but for
the whole device (such as
/sys/devices/pci0000:00/0000:00:01.2/usb1/1-1/usbip_status).
* per interface information, such as interface class or protocol, is
no longer sent/received; only device specific information is
transmitted.
* since the driver was moved one level below in the USB architecture,
there is no need to bind/unbind each interface, just the device as a
whole.

Signed-off-by: Valentina Manea <valentina.manea.m@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
12 files changed:
drivers/staging/usbip/stub.h
drivers/staging/usbip/stub_dev.c
drivers/staging/usbip/stub_main.c
drivers/staging/usbip/stub_rx.c
drivers/staging/usbip/userspace/libsrc/usbip_host_driver.c
drivers/staging/usbip/userspace/src/usbip_bind.c
drivers/staging/usbip/userspace/src/usbip_list.c
drivers/staging/usbip/userspace/src/usbip_unbind.c
drivers/staging/usbip/userspace/src/usbipd.c
drivers/usb/core/generic.c
drivers/usb/core/message.c
include/linux/usb.h