diff --git a/drivers/staging/unisys/Kconfig b/drivers/staging/unisys/Kconfig index dbdd4492cf0f..50223c74eb50 100644 --- a/drivers/staging/unisys/Kconfig +++ b/drivers/staging/unisys/Kconfig @@ -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 diff --git a/drivers/staging/unisys/Makefile b/drivers/staging/unisys/Makefile index b14a4777fd48..e0c893a6e870 100644 --- a/drivers/staging/unisys/Makefile +++ b/drivers/staging/unisys/Makefile @@ -2,5 +2,4 @@ # Makefile for Unisys SPAR drivers # obj-$(CONFIG_UNISYS_VISORUTIL) += visorutil/ -obj-$(CONFIG_UNISYS_VISORCHIPSET) += visorchipset/ obj-$(CONFIG_UNISYS_VISORBUS) += visorbus/ diff --git a/drivers/staging/unisys/visorbus/Kconfig b/drivers/staging/unisys/visorbus/Kconfig index 12cf8f063550..420c9eee9075 100644 --- a/drivers/staging/unisys/visorbus/Kconfig +++ b/drivers/staging/unisys/visorbus/Kconfig @@ -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. diff --git a/drivers/staging/unisys/visorbus/Makefile b/drivers/staging/unisys/visorbus/Makefile index 7151690695f5..16d3ff507a0a 100644 --- a/drivers/staging/unisys/visorbus/Makefile +++ b/drivers/staging/unisys/visorbus/Makefile @@ -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 diff --git a/drivers/staging/unisys/visorbus/visorbus_main.c b/drivers/staging/unisys/visorbus/visorbus_main.c index d7ca1163c1b1..6c939ce503a1 100644 --- a/drivers/staging/unisys/visorbus/visorbus_main.c +++ b/drivers/staging/unisys/visorbus/visorbus_main.c @@ -18,7 +18,7 @@ #include #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 @@ away: 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); diff --git a/drivers/staging/unisys/visorchipset/visorchipset.h b/drivers/staging/unisys/visorbus/visorbus_private.h similarity index 98% rename from drivers/staging/unisys/visorchipset/visorchipset.h rename to drivers/staging/unisys/visorbus/visorbus_private.h index 264a3e9226ea..68d770f29115 100644 --- a/drivers/staging/unisys/visorchipset/visorchipset.h +++ b/drivers/staging/unisys/visorbus/visorbus_private.h @@ -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 diff --git a/drivers/staging/unisys/visorchipset/visorchipset_main.c b/drivers/staging/unisys/visorbus/visorchipset.c similarity index 99% rename from drivers/staging/unisys/visorchipset/visorchipset_main.c rename to drivers/staging/unisys/visorbus/visorchipset.c index dc9f1dc18306..f3a2145ac3ce 100644 --- a/drivers/staging/unisys/visorchipset/visorchipset_main.c +++ b/drivers/staging/unisys/visorbus/visorchipset.c @@ -24,7 +24,7 @@ #include "uisutils.h" #include "controlvmcompletionstatus.h" #include "guestlinuxdebug.h" -#include "visorchipset.h" +#include "visorbus_private.h" #include @@ -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 { diff --git a/drivers/staging/unisys/visorchipset/Kconfig b/drivers/staging/unisys/visorchipset/Kconfig deleted file mode 100644 index 01d9a9a0e904..000000000000 --- a/drivers/staging/unisys/visorchipset/Kconfig +++ /dev/null @@ -1,11 +0,0 @@ -# -# 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. - diff --git a/drivers/staging/unisys/visorchipset/Makefile b/drivers/staging/unisys/visorchipset/Makefile deleted file mode 100644 index e9168d8d69a5..000000000000 --- a/drivers/staging/unisys/visorchipset/Makefile +++ /dev/null @@ -1,15 +0,0 @@ -# -# 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