[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <1317322504-9788-17-git-send-email-kys@microsoft.com>
Date: Thu, 29 Sep 2011 11:54:57 -0700
From: "K. Y. Srinivasan" <kys@...rosoft.com>
To: gregkh@...e.de, linux-kernel@...r.kernel.org,
devel@...uxdriverproject.org, virtualization@...ts.osdl.org,
ohering@...e.com
Cc: "K. Y. Srinivasan" <kys@...rosoft.com>,
Haiyang Zhang <haiyangz@...rosoft.com>
Subject: [PATCH 17/24] Staging: hv: mousevsc: Get rid of mousevsc_on_device_remove() by inlining code
Get rid of mousevsc_on_device_remove() by inlining code.
Signed-off-by: K. Y. Srinivasan <kys@...rosoft.com>
Signed-off-by: Haiyang Zhang <haiyangz@...rosoft.com>
---
drivers/staging/hv/hv_mouse.c | 47 ++++++++++++++--------------------------
1 files changed, 17 insertions(+), 30 deletions(-)
diff --git a/drivers/staging/hv/hv_mouse.c b/drivers/staging/hv/hv_mouse.c
index 75ea2db..5324429 100644
--- a/drivers/staging/hv/hv_mouse.c
+++ b/drivers/staging/hv/hv_mouse.c
@@ -660,33 +660,6 @@ static int mousevsc_on_device_add(struct hv_device *device,
return ret;
}
-static int mousevsc_on_device_remove(struct hv_device *device)
-{
- struct mousevsc_dev *input_dev;
- int ret = 0;
-
-
- input_dev = release_input_device(device);
-
-
- /*
- * At this point, all outbound traffic should be disable. We only
- * allow inbound traffic (responses) to proceed
- *
- * so that outstanding requests can be completed.
- */
-
- input_dev = final_release_input_device(device);
-
- /* Close the channel */
- vmbus_close(device->channel);
-
- free_input_device(input_dev);
-
- return ret;
-}
-
-
static int mousevsc_probe(struct hv_device *dev,
const struct hv_vmbus_device_id *dev_id)
{
@@ -706,11 +679,25 @@ static int mousevsc_remove(struct hv_device *dev)
hid_destroy_device(input_dev->hid_device);
}
+
+ release_input_device(dev);
+
+
/*
- * Call to the vsc driver to let it know that the device
- * is being removed
+ * At this point, all outbound traffic should be disable. We only
+ * allow inbound traffic (responses) to proceed
+ *
+ * so that outstanding requests can be completed.
*/
- return mousevsc_on_device_remove(dev);
+
+ input_dev = final_release_input_device(dev);
+
+ /* Close the channel */
+ vmbus_close(dev->channel);
+
+ free_input_device(input_dev);
+
+ return 0;
}
static const struct hv_vmbus_device_id id_table[] = {
--
1.7.4.1
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists