Skip to content

Commit

Permalink
staging: unisys: simplify controlvm channel address function
Browse files Browse the repository at this point in the history
There is no reason to have controlvm_get_channel_address() defined in a
separate file. Move it to visorchipset_main.c, remove the no-op functions
controlvm_init() and controlvm_deinit() from visorchipset_main.c, and remove
the controlvm.h and controlvm_direct.c files from the module.

Signed-off-by: Benjamin Romer <benjamin.romer@unisys.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
  • Loading branch information
Benjamin Romer authored and Greg Kroah-Hartman committed Jul 18, 2014
1 parent ea702e7 commit 524b0b6
Show file tree
Hide file tree
Showing 4 changed files with 15 additions and 94 deletions.
3 changes: 1 addition & 2 deletions drivers/staging/unisys/visorchipset/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,7 @@

obj-$(CONFIG_UNISYS_VISORCHIPSET) += visorchipset.o

visorchipset-y := visorchipset_main.o controlvm_direct.o file.o \
parser.o
visorchipset-y := visorchipset_main.o file.o parser.o

ccflags-y += -Idrivers/staging/unisys/include
ccflags-y += -Idrivers/staging/unisys/uislib
Expand Down
27 changes: 0 additions & 27 deletions drivers/staging/unisys/visorchipset/controlvm.h

This file was deleted.

62 changes: 0 additions & 62 deletions drivers/staging/unisys/visorchipset/controlvm_direct.c

This file was deleted.

17 changes: 14 additions & 3 deletions drivers/staging/unisys/visorchipset/visorchipset_main.c
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,6 @@
*/

#include "globals.h"
#include "controlvm.h"
#include "visorchipset.h"
#include "procobjecttree.h"
#include "visorchannel.h"
Expand Down Expand Up @@ -1837,6 +1836,20 @@ handle_command(CONTROLVM_MESSAGE inmsg, HOSTADDRESS channel_addr)
return TRUE;
}

HOSTADDRESS controlvm_get_channel_address(void)
{
U64 addr = 0;
U32 size = 0;

if (!VMCALL_SUCCESSFUL(Issue_VMCALL_IO_CONTROLVM_ADDR(&addr, &size))) {
ERRDRV("%s - vmcall to determine controlvm channel addr failed",
__func__);
return 0;
}
INFODRV("controlvm addr=%Lx", addr);
return addr;
}

static void
controlvm_periodic_work(struct work_struct *work)
{
Expand Down Expand Up @@ -2633,7 +2646,6 @@ visorchipset_init(void)
goto Away;
}

controlvm_init();
MajorDev = MKDEV(visorchipset_major, 0);
rc = visorchipset_file_init(MajorDev, &ControlVm_channel);
if (rc < 0) {
Expand Down Expand Up @@ -2789,7 +2801,6 @@ visorchipset_exit(void)
visorchannel_destroy(ControlVm_channel);
ControlVm_channel = NULL;
}
controlvm_deinit();
visorchipset_file_cleanup();
POSTCODE_LINUX_2(DRIVER_EXIT_PC, POSTCODE_SEVERITY_INFO);
LOGINF("chipset driver unloaded");
Expand Down

0 comments on commit 524b0b6

Please sign in to comment.