staging: unisys: visorbus: Get rid of passthrough function visorchipset_bus_destroy
authorSameer Wadgaonkar <sameer.wadgaonkar@unisys.com>
Tue, 22 Aug 2017 17:27:33 +0000 (13:27 -0400)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Tue, 22 Aug 2017 22:14:55 +0000 (15:14 -0700)
The function visorchipset_bus_destroy just called viosrbus_remove_instance,
we can just combine it with visorbus_remove_instance.

Signed-off-by: Sameer Wadgaonkar <sameer.wadgaonkar@unisys.com>
Signed-off-by: David Kershner <david.kershner@unisys.com>
Reviewed-by: Tim Sell <timothy.sell@unisys.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/staging/unisys/visorbus/visorbus_main.c
drivers/staging/unisys/visorbus/visorbus_private.h
drivers/staging/unisys/visorbus/visorchipset.c

index 6dad2598132d480a41552e85ea092834e6045187..a3fde23dc03ae27fedcd3744a6c32bec0b6316ad 100644 (file)
@@ -1085,7 +1085,7 @@ err_debugfs_dir:
  * visorbus_remove_instance() - remove a device instance for the visorbus itself
  * @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
@@ -1099,6 +1099,7 @@ static void visorbus_remove_instance(struct visor_device *dev)
        kfree(dev->vbus_hdr_info);
        list_del(&dev->list_all);
        device_unregister(&dev->device);
+       visorbus_response(dev, 0, CONTROLVM_BUS_DESTROY);
 }
 
 /*
@@ -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 err;
index 55ce5c7c60c52a076eaf4cf1e7570e89e96eefb8..929e09b28a71985988166abfb3c1236bbaac8ab0 100644 (file)
@@ -24,7 +24,7 @@
 #include "visorbus.h"
 
 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);
 void visorchipset_device_destroy(struct visor_device *dev_info);
 int visorchipset_device_pause(struct visor_device *dev_info);
index 1cedb3bbcafacbdd36d580a9e4a5c5f2d29514c3..a478533a231c12ac03167a0e03afb25a58737d1b 100644 (file)
@@ -700,8 +700,8 @@ static int visorbus_destroy(struct controlvm_message *inmsg)
                bus_info->pending_msg_hdr = pmsg_hdr;
        }
 
-       /* Response will be handled by visorchipset_bus_destroy */
-       visorchipset_bus_destroy(bus_info);
+       /* Response will be handled by visorbus_remove_instance */
+       visorbus_remove_instance(bus_info);
        return 0;
 
 err_respond: