[PATCH v2 45/46] staging: unisys: visorbus: Get rid of passthrough function visorchipset_device_destroy

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



From: Sameer Wadgaonkar <sameer.wadgaonkar@xxxxxxxxxx>

The function visorchipset_device_destroy just called remove_visor_device,
we can just combine it with remove_visor_device.

Signed-off-by: Sameer Wadgaonkar <sameer.wadgaonkar@xxxxxxxxxx>
Signed-off-by: David Kershner <david.kershner@xxxxxxxxxx>
Reviewed-by: Tim Sell <timothy.sell@xxxxxxxxxx>
---
 drivers/staging/unisys/visorbus/visorbus_main.c    |  9 ++-------
 drivers/staging/unisys/visorbus/visorbus_private.h |  2 +-
 drivers/staging/unisys/visorbus/visorchipset.c     |  2 +-
 3 files changed, 4 insertions(+), 9 deletions(-)

diff --git a/drivers/staging/unisys/visorbus/visorbus_main.c b/drivers/staging/unisys/visorbus/visorbus_main.c
index 1c037a3..38f07b0 100644
--- a/drivers/staging/unisys/visorbus/visorbus_main.c
+++ b/drivers/staging/unisys/visorbus/visorbus_main.c
@@ -716,11 +716,12 @@ int create_visor_device(struct visor_device *dev)
 	return err;
 }
 
-static void remove_visor_device(struct visor_device *dev)
+void remove_visor_device(struct visor_device *dev)
 {
 	list_del(&dev->list_all);
 	put_device(&dev->device);
 	device_unregister(&dev->device);
+	visorbus_response(dev, 0, CONTROLVM_DEVICE_DESTROY);
 }
 
 static int get_vbus_header_info(struct visorchannel *chan,
@@ -1119,12 +1120,6 @@ static void remove_all_visor_devices(void)
 	}
 }
 
-void visorchipset_device_destroy(struct visor_device *dev_info)
-{
-	remove_visor_device(dev_info);
-	visorbus_response(dev_info, 0, CONTROLVM_DEVICE_DESTROY);
-}
-
 /*
  * pause_state_change_complete() - the callback function to be called by a
  *                                 visorbus function driver when a
diff --git a/drivers/staging/unisys/visorbus/visorbus_private.h b/drivers/staging/unisys/visorbus/visorbus_private.h
index 56c38d5..8651c87 100644
--- a/drivers/staging/unisys/visorbus/visorbus_private.h
+++ b/drivers/staging/unisys/visorbus/visorbus_private.h
@@ -26,7 +26,7 @@
 int visorbus_create_instance(struct visor_device *dev);
 void visorbus_remove_instance(struct visor_device *bus_info);
 int create_visor_device(struct visor_device *dev_info);
-void visorchipset_device_destroy(struct visor_device *dev_info);
+void remove_visor_device(struct visor_device *dev_info);
 int visorchipset_device_pause(struct visor_device *dev_info);
 int visorchipset_device_resume(struct visor_device *dev_info);
 
diff --git a/drivers/staging/unisys/visorbus/visorchipset.c b/drivers/staging/unisys/visorbus/visorchipset.c
index 153c7e5..25a30a4 100644
--- a/drivers/staging/unisys/visorbus/visorchipset.c
+++ b/drivers/staging/unisys/visorbus/visorchipset.c
@@ -948,7 +948,7 @@ static int visorbus_device_destroy(struct controlvm_message *inmsg)
 	}
 
 	kfree(dev_info->name);
-	visorchipset_device_destroy(dev_info);
+	remove_visor_device(dev_info);
 	return 0;
 
 err_respond:
-- 
git-series 0.9.1
_______________________________________________
devel mailing list
devel@xxxxxxxxxxxxxxxxxxxxxx
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel



[Index of Archives]     [Linux Driver Backports]     [DMA Engine]     [Linux GPIO]     [Linux SPI]     [Video for Linux]     [Linux USB Devel]     [Linux Coverity]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [Yosemite Backpacking]
  Powered by Linux