summaryrefslogtreecommitdiffstats
path: root/drivers/staging/unisys/visorbus/visorchipset.c
diff options
context:
space:
mode:
authorSameer Wadgaonkar2017-08-22 19:27:03 +0200
committerGreg Kroah-Hartman2017-08-22 23:56:04 +0200
commit76956aa7be7e85b7653adae2dad0a81b959c6247 (patch)
treeb6f59e0c918947b7ababb01b18b876da0e2a24fb /drivers/staging/unisys/visorbus/visorchipset.c
parentstaging: unisys: include: fix improper use of dma_data_direction (diff)
downloadkernel-qcow2-linux-76956aa7be7e85b7653adae2dad0a81b959c6247.tar.gz
kernel-qcow2-linux-76956aa7be7e85b7653adae2dad0a81b959c6247.tar.xz
kernel-qcow2-linux-76956aa7be7e85b7653adae2dad0a81b959c6247.zip
staging: unisys: visorbus: merging the visorbus_*_response functions into one.
The functions visorbus_create_response(), visorbus_destroy_response(), viosrbus_device_create_response(), viosrbus_device_destroy_response() are all functionally similar. Merging these four functions into a single function called visorbus_response(). 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>
Diffstat (limited to 'drivers/staging/unisys/visorbus/visorchipset.c')
-rw-r--r--drivers/staging/unisys/visorbus/visorchipset.c41
1 files changed, 3 insertions, 38 deletions
diff --git a/drivers/staging/unisys/visorbus/visorchipset.c b/drivers/staging/unisys/visorbus/visorchipset.c
index 28ea21f84d7f..a203c19048ea 100644
--- a/drivers/staging/unisys/visorbus/visorchipset.c
+++ b/drivers/staging/unisys/visorbus/visorchipset.c
@@ -1446,50 +1446,15 @@ static void setup_crash_devices_work_queue(struct work_struct *work)
visorbus_device_create(&local_crash_dev_msg);
}
-void visorbus_create_response(struct visor_device *bus_info, int response)
+void visorbus_response(struct visor_device *bus_info, int response,
+ int controlvm_id)
{
- if (response >= 0)
- bus_info->state.created = 1;
-
- controlvm_responder(CONTROLVM_BUS_CREATE, bus_info->pending_msg_hdr,
- response);
+ controlvm_responder(controlvm_id, bus_info->pending_msg_hdr, response);
kfree(bus_info->pending_msg_hdr);
bus_info->pending_msg_hdr = NULL;
}
-void visorbus_destroy_response(struct visor_device *bus_info, int response)
-{
- controlvm_responder(CONTROLVM_BUS_DESTROY, bus_info->pending_msg_hdr,
- response);
-
- kfree(bus_info->pending_msg_hdr);
- bus_info->pending_msg_hdr = NULL;
-}
-
-void visorbus_device_create_response(struct visor_device *dev_info,
- int response)
-{
- if (response >= 0)
- dev_info->state.created = 1;
-
- controlvm_responder(CONTROLVM_DEVICE_CREATE, dev_info->pending_msg_hdr,
- response);
-
- kfree(dev_info->pending_msg_hdr);
- dev_info->pending_msg_hdr = NULL;
-}
-
-void visorbus_device_destroy_response(struct visor_device *dev_info,
- int response)
-{
- controlvm_responder(CONTROLVM_DEVICE_DESTROY, dev_info->pending_msg_hdr,
- response);
-
- kfree(dev_info->pending_msg_hdr);
- dev_info->pending_msg_hdr = NULL;
-}
-
void visorbus_device_pause_response(struct visor_device *dev_info,
int response)
{