staging: unisys: move visorchipset files to visorbus
authorPrarit Bhargava <prarit@redhat.com>
Tue, 5 May 2015 22:36:15 +0000 (18:36 -0400)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Fri, 8 May 2015 13:26:01 +0000 (15:26 +0200)
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: Prarit Bhargava <prarit@redhat.com>
Signed-off-by: Benjamin Romer <benjamin.romer@unisys.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/staging/unisys/Kconfig
drivers/staging/unisys/Makefile
drivers/staging/unisys/visorbus/Kconfig
drivers/staging/unisys/visorbus/Makefile
drivers/staging/unisys/visorbus/visorbus_main.c
drivers/staging/unisys/visorbus/visorbus_private.h [moved from drivers/staging/unisys/visorchipset/visorchipset.h with 98% similarity]
drivers/staging/unisys/visorbus/visorchipset.c [moved from drivers/staging/unisys/visorchipset/visorchipset_main.c with 99% similarity]
drivers/staging/unisys/visorchipset/Kconfig [deleted file]
drivers/staging/unisys/visorchipset/Makefile [deleted file]

index dbdd449..50223c7 100644 (file)
@@ -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
index b14a477..e0c893a 100644 (file)
@@ -2,5 +2,4 @@
 # Makefile for Unisys SPAR drivers
 #
 obj-$(CONFIG_UNISYS_VISORUTIL)         += visorutil/
-obj-$(CONFIG_UNISYS_VISORCHIPSET)      += visorchipset/
 obj-$(CONFIG_UNISYS_VISORBUS)          += visorbus/
index 12cf8f0..420c9ee 100644 (file)
@@ -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.
index 7151690..16d3ff5 100644 (file)
@@ -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
index d7ca116..6c939ce 100644 (file)
@@ -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 @@ 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);
@@ -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 {
diff --git a/drivers/staging/unisys/visorchipset/Kconfig b/drivers/staging/unisys/visorchipset/Kconfig
deleted file mode 100644 (file)
index 01d9a9a..0000000
+++ /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 (file)
index e9168d8..0000000
+++ /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