Commit d012c2a5 authored by matt mooney's avatar matt mooney Committed by Greg Kroah-Hartman

staging: usbip: stub_dev.c: move stub_driver definition and update driver name

Move the stub_driver definition to the end of file and, therefore,
remove foward declarations. Update driver name to usbip-host.

A few comments were slightly edited too.
Signed-off-by: default avatarmatt mooney <mfm@muteddisk.com>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@suse.de>
parent b7d27ead
...@@ -23,14 +23,10 @@ ...@@ -23,14 +23,10 @@
#include "usbip_common.h" #include "usbip_common.h"
#include "stub.h" #include "stub.h"
static int stub_probe(struct usb_interface *interface,
const struct usb_device_id *id);
static void stub_disconnect(struct usb_interface *interface);
/* /*
* Define device IDs here if you want to explicitly limit exportable devices. * Define device IDs here if you want to explicitly limit exportable devices.
* In the most cases, wild card matching will be ok because driver binding can * In most cases, wildcard matching will be okay because driver binding can be
* be changed dynamically by a userland program. * changed dynamically by a userland program.
*/ */
static struct usb_device_id stub_table[] = { static struct usb_device_id stub_table[] = {
#if 0 #if 0
...@@ -54,16 +50,9 @@ static struct usb_device_id stub_table[] = { ...@@ -54,16 +50,9 @@ static struct usb_device_id stub_table[] = {
}; };
MODULE_DEVICE_TABLE(usb, stub_table); MODULE_DEVICE_TABLE(usb, stub_table);
struct usb_driver stub_driver = {
.name = "usbip",
.probe = stub_probe,
.disconnect = stub_disconnect,
.id_table = stub_table,
};
/* /*
* usbip_status shows status of usbip as long as this driver is bound to the * usbip_status shows the status of usbip-host as long as this driver is bound
* target device. * to the target device.
*/ */
static ssize_t show_status(struct device *dev, struct device_attribute *attr, static ssize_t show_status(struct device *dev, struct device_attribute *attr,
char *buf) char *buf)
...@@ -423,7 +412,7 @@ static int stub_probe(struct usb_interface *interface, ...@@ -423,7 +412,7 @@ static int stub_probe(struct usb_interface *interface,
return 0; return 0;
} }
/* ok. this is my device. */ /* ok, this is my device */
sdev = stub_device_alloc(udev, interface); sdev = stub_device_alloc(udev, interface);
if (!sdev) if (!sdev)
return -ENOMEM; return -ENOMEM;
...@@ -534,3 +523,10 @@ static void stub_disconnect(struct usb_interface *interface) ...@@ -534,3 +523,10 @@ static void stub_disconnect(struct usb_interface *interface)
del_match_busid((char *)udev_busid); del_match_busid((char *)udev_busid);
} }
} }
struct usb_driver stub_driver = {
.name = "usbip-host",
.probe = stub_probe,
.disconnect = stub_disconnect,
.id_table = stub_table,
};
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment