Commit a7093ba1 authored by Sameer Wadgaonkar's avatar Sameer Wadgaonkar Committed by Greg Kroah-Hartman

staging: unisys: visorbus: Get rid of passthrough function visorchipset_bus_destroy

The function visorchipset_bus_destroy just called viosrbus_remove_instance,
we can just combine it with visorbus_remove_instance.
Signed-off-by: default avatarSameer Wadgaonkar <sameer.wadgaonkar@unisys.com>
Signed-off-by: default avatarDavid Kershner <david.kershner@unisys.com>
Reviewed-by: default avatarTim Sell <timothy.sell@unisys.com>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent 17d3208c
...@@ -1085,7 +1085,7 @@ int visorbus_create_instance(struct visor_device *dev) ...@@ -1085,7 +1085,7 @@ int visorbus_create_instance(struct visor_device *dev)
* visorbus_remove_instance() - remove a device instance for the visorbus itself * visorbus_remove_instance() - remove a device instance for the visorbus itself
* @dev: struct visor_device indentifying the bus to remove * @dev: struct visor_device indentifying the bus to remove
*/ */
static void visorbus_remove_instance(struct visor_device *dev) void visorbus_remove_instance(struct visor_device *dev)
{ {
/* /*
* Note that this will result in the release method for * Note that this will result in the release method for
...@@ -1099,6 +1099,7 @@ static void visorbus_remove_instance(struct visor_device *dev) ...@@ -1099,6 +1099,7 @@ static void visorbus_remove_instance(struct visor_device *dev)
kfree(dev->vbus_hdr_info); kfree(dev->vbus_hdr_info);
list_del(&dev->list_all); list_del(&dev->list_all);
device_unregister(&dev->device); device_unregister(&dev->device);
visorbus_response(dev, 0, CONTROLVM_BUS_DESTROY);
} }
/* /*
...@@ -1116,12 +1117,6 @@ static void remove_all_visor_devices(void) ...@@ -1116,12 +1117,6 @@ static void remove_all_visor_devices(void)
} }
} }
void visorchipset_bus_destroy(struct visor_device *dev)
{
visorbus_remove_instance(dev);
visorbus_response(dev, 0, CONTROLVM_BUS_DESTROY);
}
int visorchipset_device_create(struct visor_device *dev_info) int visorchipset_device_create(struct visor_device *dev_info)
{ {
int err; int err;
......
...@@ -24,7 +24,7 @@ ...@@ -24,7 +24,7 @@
#include "visorbus.h" #include "visorbus.h"
int visorbus_create_instance(struct visor_device *dev); int visorbus_create_instance(struct visor_device *dev);
void visorchipset_bus_destroy(struct visor_device *bus_info); void visorbus_remove_instance(struct visor_device *bus_info);
int visorchipset_device_create(struct visor_device *dev_info); int visorchipset_device_create(struct visor_device *dev_info);
void visorchipset_device_destroy(struct visor_device *dev_info); void visorchipset_device_destroy(struct visor_device *dev_info);
int visorchipset_device_pause(struct visor_device *dev_info); int visorchipset_device_pause(struct visor_device *dev_info);
......
...@@ -700,8 +700,8 @@ static int visorbus_destroy(struct controlvm_message *inmsg) ...@@ -700,8 +700,8 @@ static int visorbus_destroy(struct controlvm_message *inmsg)
bus_info->pending_msg_hdr = pmsg_hdr; bus_info->pending_msg_hdr = pmsg_hdr;
} }
/* Response will be handled by visorchipset_bus_destroy */ /* Response will be handled by visorbus_remove_instance */
visorchipset_bus_destroy(bus_info); visorbus_remove_instance(bus_info);
return 0; return 0;
err_respond: err_respond:
......
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