aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorBenjamin Romer <benjamin.romer@unisys.com>2014-07-17 12:39:57 -0400
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2014-07-17 18:11:33 -0700
commit524b0b63a185f951a903e3ebc67574d962dbfd98 (patch)
tree6c075d328a8cc9f164937ec16e1adb00921f7265
parentdrivers/staging/comedi/drivers/addi-data/hwdrv_apci3200.c: drop incorrect checks (diff)
downloadlinux-dev-524b0b63a185f951a903e3ebc67574d962dbfd98.tar.xz
linux-dev-524b0b63a185f951a903e3ebc67574d962dbfd98.zip
staging: unisys: simplify controlvm channel address function
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>
-rw-r--r--drivers/staging/unisys/visorchipset/Makefile3
-rw-r--r--drivers/staging/unisys/visorchipset/controlvm.h27
-rw-r--r--drivers/staging/unisys/visorchipset/controlvm_direct.c62
-rw-r--r--drivers/staging/unisys/visorchipset/visorchipset_main.c17
4 files changed, 15 insertions, 94 deletions
diff --git a/drivers/staging/unisys/visorchipset/Makefile b/drivers/staging/unisys/visorchipset/Makefile
index 5071878e57da..12686906bef3 100644
--- a/drivers/staging/unisys/visorchipset/Makefile
+++ b/drivers/staging/unisys/visorchipset/Makefile
@@ -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
diff --git a/drivers/staging/unisys/visorchipset/controlvm.h b/drivers/staging/unisys/visorchipset/controlvm.h
deleted file mode 100644
index 012891c3f21d..000000000000
--- a/drivers/staging/unisys/visorchipset/controlvm.h
+++ /dev/null
@@ -1,27 +0,0 @@
-/* controlvm.h
- *
- * Copyright (C) 2010 - 2013 UNISYS CORPORATION
- * All rights reserved.
- *
- * This program is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 2 of the License, or (at
- * your option) any later version.
- *
- * This program is distributed in the hope that it will be useful, but
- * WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE, GOOD TITLE or
- * NON INFRINGEMENT. See the GNU General Public License for more
- * details.
- */
-
-#ifndef __CONTROLVM_H__
-#define __CONTROLVM_H__
-
-#include "timskmod.h"
-
-int controlvm_init(void);
-void controlvm_deinit(void);
-HOSTADDRESS controlvm_get_channel_address(void);
-
-#endif
diff --git a/drivers/staging/unisys/visorchipset/controlvm_direct.c b/drivers/staging/unisys/visorchipset/controlvm_direct.c
deleted file mode 100644
index cd10e3a2a07f..000000000000
--- a/drivers/staging/unisys/visorchipset/controlvm_direct.c
+++ /dev/null
@@ -1,62 +0,0 @@
-/* controlvm_direct.c
- *
- * Copyright (C) 2010 - 2013 UNISYS CORPORATION
- * All rights reserved.
- *
- * This program is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 2 of the License, or (at
- * your option) any later version.
- *
- * This program is distributed in the hope that it will be useful, but
- * WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE, GOOD TITLE or
- * NON INFRINGEMENT. See the GNU General Public License for more
- * details.
- */
-
-/* This is a controlvm-related code that is dependent upon firmware running
- * on a virtual partition.
- */
-
-#include "globals.h"
-#include "uisutils.h"
-#include "controlvm.h"
-#define CURRENT_FILE_PC VISOR_CHIPSET_PC_controlvm_direct_c
-
-
-/* We can fill in this code when we learn how to make vmcalls... */
-
-
-
-int controlvm_init(void)
-{
- return 0;
-}
-
-
-
-void controlvm_deinit(void)
-{
-}
-
-
-
-HOSTADDRESS controlvm_get_channel_address(void)
-{
- static BOOL warned = FALSE;
- U64 addr = 0;
-
- U32 size = 0;
-
- if (!VMCALL_SUCCESSFUL(Issue_VMCALL_IO_CONTROLVM_ADDR(&addr, &size))) {
- if (!warned) {
- ERRDRV("%s - vmcall to determine controlvm channel addr failed",
- __func__);
- warned = TRUE;
- }
- return 0;
- }
- INFODRV("controlvm addr=%Lx", addr);
- return addr;
-}
diff --git a/drivers/staging/unisys/visorchipset/visorchipset_main.c b/drivers/staging/unisys/visorchipset/visorchipset_main.c
index ecbeaec0e8d2..ea0fb647a0d9 100644
--- a/drivers/staging/unisys/visorchipset/visorchipset_main.c
+++ b/drivers/staging/unisys/visorchipset/visorchipset_main.c
@@ -16,7 +16,6 @@
*/
#include "globals.h"
-#include "controlvm.h"
#include "visorchipset.h"
#include "procobjecttree.h"
#include "visorchannel.h"
@@ -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)
{
@@ -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) {
@@ -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");