summaryrefslogtreecommitdiff
path: root/drivers
diff options
context:
space:
mode:
authorViresh Kumar <viresh.kumar@linaro.org>2016-04-21 11:31:16 +0530
committerGreg Kroah-Hartman <gregkh@google.com>2016-04-21 16:11:15 +0900
commit2437f1c6b582d1d676c08b6069859c11266c69da (patch)
tree627bb8464830076d5dea7eb394e5b08a04003065 /drivers
parent62de6e0a7262edebc4debd99585b19dc10d2741d (diff)
greybus: es2: move ap_disconnect() below ap_probe()
This makes it more readable, as the functions are present in this order in the structure as well. Also keeping these two makes more sense. Tested by removing the gb-es2.ko module on both EVT1.5 and qemu with gbsim. Signed-off-by: Viresh Kumar <viresh.kumar@linaro.org> Signed-off-by: Greg Kroah-Hartman <gregkh@google.com>
Diffstat (limited to 'drivers')
-rw-r--r--drivers/staging/greybus/es2.c26
1 files changed, 13 insertions, 13 deletions
diff --git a/drivers/staging/greybus/es2.c b/drivers/staging/greybus/es2.c
index 0a29708cdb74..1cef13d3fb5d 100644
--- a/drivers/staging/greybus/es2.c
+++ b/drivers/staging/greybus/es2.c
@@ -690,19 +690,6 @@ static void es2_destroy(struct es2_ap_dev *es2)
usb_put_dev(udev);
}
-static void ap_disconnect(struct usb_interface *interface)
-{
- struct es2_ap_dev *es2 = usb_get_intfdata(interface);
- int i;
-
- gb_hd_del(es2->hd);
-
- for (i = 0; i < NUM_BULKS; ++i)
- es2_cport_in_disable(es2, &es2->cport_in[i]);
-
- es2_destroy(es2);
-}
-
static void cport_in_callback(struct urb *urb)
{
struct gb_host_device *hd = urb->context;
@@ -1083,6 +1070,19 @@ error:
return retval;
}
+static void ap_disconnect(struct usb_interface *interface)
+{
+ struct es2_ap_dev *es2 = usb_get_intfdata(interface);
+ int i;
+
+ gb_hd_del(es2->hd);
+
+ for (i = 0; i < NUM_BULKS; ++i)
+ es2_cport_in_disable(es2, &es2->cport_in[i]);
+
+ es2_destroy(es2);
+}
+
static struct usb_driver es2_ap_driver = {
.name = "es2_ap_driver",
.probe = ap_probe,