Commit c79b28f7 authored by Prarit Bhargava's avatar Prarit Bhargava Committed by Greg Kroah-Hartman

staging: unisys: move visorchipset files to visorbus

Move visorchipset_main.c and visorchipset.h to visorbus/visorchipset.c and
visorbus/visorbus_private.h.  This leaves an empty visorchipset directory
which can also be destroyed.

As a result of this patch the visorchipset init code now calls the
visorbus_init() directly.  Similarily the visorchipset exit code now
cleans up by calling visorbus_exit().

No other functional changes were made.
Signed-off-by: default avatarPrarit Bhargava <prarit@redhat.com>
Signed-off-by: default avatarBenjamin Romer <benjamin.romer@unisys.com>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent 46168810
......@@ -10,7 +10,6 @@ menuconfig UNISYSSPAR
if UNISYSSPAR
source "drivers/staging/unisys/visorutil/Kconfig"
source "drivers/staging/unisys/visorchipset/Kconfig"
source "drivers/staging/unisys/visorbus/Kconfig"
endif # UNISYSSPAR
......@@ -2,5 +2,4 @@
# Makefile for Unisys SPAR drivers
#
obj-$(CONFIG_UNISYS_VISORUTIL) += visorutil/
obj-$(CONFIG_UNISYS_VISORCHIPSET) += visorchipset/
obj-$(CONFIG_UNISYS_VISORBUS) += visorbus/
......@@ -4,6 +4,6 @@
config UNISYS_VISORBUS
tristate "Unisys visorbus driver"
depends on UNISYSSPAR && UNISYS_VISORUTIL && UNISYS_VISORCHIPSET
depends on UNISYSSPAR && UNISYS_VISORUTIL
---help---
If you say Y here, you will enable the Unisys visorbus driver.
......@@ -6,9 +6,9 @@ obj-$(CONFIG_UNISYS_VISORBUS) += visorbus.o
visorbus-y := visorbus_main.o
visorbus-y += visorchannel.o
visorbus-y += visorchipset.o
ccflags-y += -Idrivers/staging/unisys/include
ccflags-y += -Idrivers/staging/unisys/visorchipset
ccflags-y += -Idrivers/staging/unisys/common-spar/include
ccflags-y += -Idrivers/staging/unisys/common-spar/include/channels
ccflags-y += -Idrivers/staging/unisys/visorutil
......@@ -18,7 +18,7 @@
#include <linux/uuid.h>
#include "visorbus.h"
#include "visorchipset.h"
#include "visorbus_private.h"
#include "version.h"
#include "timskmod.h"
#include "periodic_work.h"
......@@ -26,6 +26,8 @@
#include "guestlinuxdebug.h"
#include "vbusdeviceinfo.h"
#define MYDRVNAME "visorbus"
/* module parameters */
int visorbus_debug;
int visorbus_forcematch;
......@@ -2033,7 +2035,7 @@ struct channel_size_info {
unsigned long max_size;
};
static int __init
int __init
visorbus_init(void)
{
int rc = 0;
......@@ -2077,7 +2079,7 @@ visorbus_init(void)
return rc;
}
static void
void
visorbus_exit(void)
{
struct list_head *listentry, *listtmp;
......@@ -2135,9 +2137,6 @@ MODULE_PARM_DESC(visorbus_serialloopbacktest,
"non-0 to just create 2 serial devices on the same channel");
int visorbus_serialloopbacktest = 0;
module_init(visorbus_init);
module_exit(visorbus_exit);
MODULE_AUTHOR("Unisys");
MODULE_LICENSE("GPL");
MODULE_DESCRIPTION("Supervisor bus driver for service partition: ver " VERSION);
......
......@@ -211,4 +211,8 @@ void visorchipset_cache_free(struct kmem_cache *pool, void *p,
int visorchipset_file_init(dev_t majorDev,
struct visorchannel **pControlVm_channel);
void visorchipset_file_cleanup(dev_t major_dev);
/* visorbus init and exit functions */
int __init visorbus_init(void);
void visorbus_exit(void);
#endif
......@@ -24,7 +24,7 @@
#include "uisutils.h"
#include "controlvmcompletionstatus.h"
#include "guestlinuxdebug.h"
#include "visorchipset.h"
#include "visorbus_private.h"
#include <linux/ctype.h>
......@@ -168,7 +168,7 @@ static struct visor_livedump_info livedump_info;
* process it again the next time controlvm_periodic_work() runs.
*/
static struct controlvm_message controlvm_pending_msg;
static bool controlvm_pending_msg_valid = false;
static bool controlvm_pending_msg_valid;
/* This identifies a data buffer that has been received via a controlvm messages
* in a remote --> local CONTROLVM_TRANSMIT_FILE conversation.
......@@ -2783,7 +2783,8 @@ visorchipset_init(void)
goto cleanup;
}
POSTCODE_LINUX_2(CHIPSET_INIT_SUCCESS_PC, POSTCODE_SEVERITY_INFO);
rc = 0;
rc = visorbus_init();
cleanup:
if (rc) {
POSTCODE_LINUX_3(CHIPSET_INIT_FAILURE_PC, rc,
......@@ -2806,6 +2807,8 @@ visorchipset_exit(void)
{
POSTCODE_LINUX_2(DRIVER_EXIT_PC, POSTCODE_SEVERITY_INFO);
visorbus_exit();
if (visorchipset_disable_controlvm) {
;
} else {
......
#
# Unisys visorchipset configuration
#
config UNISYS_VISORCHIPSET
tristate "Unisys visorchipset driver"
select UNISYS_VISORUTIL
select UNISYS_VISORBUS
---help---
If you say Y here, you will enable the Unisys visorchipset driver.
#
# Makefile for Unisys visorchipset
#
obj-$(CONFIG_UNISYS_VISORCHIPSET) += visorchipset.o
visorchipset-y := visorchipset_main.o
ccflags-y += -Idrivers/staging/unisys/include
ccflags-y += -Idrivers/staging/unisys/uislib
ccflags-y += -Idrivers/staging/unisys/common-spar/include
ccflags-y += -Idrivers/staging/unisys/common-spar/include/channels
ccflags-y += -Idrivers/staging/unisys/visorutil
ccflags-y += -Idrivers/staging/unisys/visorbus
ccflags-y += -Iinclude/generated
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment