From 1b1732c4c473ba59901cf5cc5c6ef2d3578cce14 Mon Sep 17 00:00:00 2001 From: Johan Hovold Date: Fri, 26 Aug 2016 12:55:51 +0200 Subject: [PATCH] greybus: es2: remove obsolete cport-reset ARPC Remove the now obsolete and redundant cport-reset ARPC, along with the consequently unused cport_disable callback. Signed-off-by: Johan Hovold Signed-off-by: Greg Kroah-Hartman --- drivers/staging/greybus/arpc.h | 5 ----- drivers/staging/greybus/es2.c | 38 ---------------------------------- 2 files changed, 43 deletions(-) diff --git a/drivers/staging/greybus/arpc.h b/drivers/staging/greybus/arpc.h index d0230ab6b81f..7fbddfc40d83 100644 --- a/drivers/staging/greybus/arpc.h +++ b/drivers/staging/greybus/arpc.h @@ -76,17 +76,12 @@ struct arpc_response_message { /* ARPC requests */ -#define ARPC_TYPE_CPORT_RESET 0x00 #define ARPC_TYPE_CPORT_CONNECTED 0x01 #define ARPC_TYPE_CPORT_QUIESCE 0x02 #define ARPC_TYPE_CPORT_CLEAR 0x03 #define ARPC_TYPE_CPORT_FLUSH 0x04 #define ARPC_TYPE_CPORT_SHUTDOWN 0x05 -struct arpc_cport_reset_req { - __le16 cport_id; -} __packed; - struct arpc_cport_connected_req { __le16 cport_id; } __packed; diff --git a/drivers/staging/greybus/es2.c b/drivers/staging/greybus/es2.c index b225fc3e3e07..df104796a285 100644 --- a/drivers/staging/greybus/es2.c +++ b/drivers/staging/greybus/es2.c @@ -611,32 +611,6 @@ static void message_cancel(struct gb_message *message) usb_free_urb(urb); } -static int cport_reset(struct gb_host_device *hd, u16 cport_id) -{ - struct es2_ap_dev *es2 = hd_to_es2(hd); - struct usb_device *udev = es2->usb_dev; - struct arpc_cport_reset_req req; - int retval; - int result; - - switch (cport_id) { - case GB_SVC_CPORT_ID: - case ES2_CPORT_CDSI0: - case ES2_CPORT_CDSI1: - return 0; - } - - req.cport_id = cpu_to_le16(cport_id); - retval = arpc_sync(es2, ARPC_TYPE_CPORT_RESET, &req, sizeof(req), - &result, ES2_ARPC_CPORT_TIMEOUT); - if (retval == -EREMOTEIO) { - dev_err(&udev->dev, "failed to reset cport %u: %d\n", cport_id, - result); - } - - return retval; -} - static int es2_cport_allocate(struct gb_host_device *hd, int cport_id, unsigned long flags) { @@ -735,17 +709,6 @@ out: return ret; } -static int cport_disable(struct gb_host_device *hd, u16 cport_id) -{ - int retval; - - retval = cport_reset(hd, cport_id); - if (retval) - return retval; - - return 0; -} - static int es2_cport_connected(struct gb_host_device *hd, u16 cport_id) { struct es2_ap_dev *es2 = hd_to_es2(hd); @@ -1004,7 +967,6 @@ static struct gb_hd_driver es2_driver = { .cport_allocate = es2_cport_allocate, .cport_release = es2_cport_release, .cport_enable = cport_enable, - .cport_disable = cport_disable, .cport_connected = es2_cport_connected, .cport_flush = es2_cport_flush, .cport_shutdown = es2_cport_shutdown,