staging: unisys: refactor VISORCHIPSET_BUSDEV_NOTIFIERS
authorBenjamin Romer <benjamin.romer@unisys.com>
Fri, 31 Oct 2014 13:57:32 +0000 (09:57 -0400)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Tue, 4 Nov 2014 00:02:46 +0000 (16:02 -0800)
Get rid of the typedef and just use struct visorchipset_busdev_notifiers
instead. Fix CamelCase names in parameters for the function pointers:

busNo => bus_no
devNo => dev_no
typeGuid => type_uuid
minSize => min_size
maxSize => max_size

Update references.

Signed-off-by: Benjamin Romer <benjamin.romer@unisys.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/staging/unisys/visorchipset/visorchipset.h
drivers/staging/unisys/visorchipset/visorchipset_main.c

index 7d3b2c1..da14ef7 100644 (file)
@@ -217,16 +217,16 @@ struct visorchipset_internalport_info {
  *  events happen.  (The implementation of these functions is outside of
  *  visorchipset.)
  */
-typedef struct {
-       void (*bus_create)(ulong busNo);
-       void (*bus_destroy)(ulong busNo);
-       void (*device_create)(ulong busNo, ulong devNo);
-       void (*device_destroy)(ulong busNo, ulong devNo);
-       void (*device_pause)(ulong busNo, ulong devNo);
-       void (*device_resume)(ulong busNo, ulong devNo);
-       int (*get_channel_info)(uuid_le typeGuid, ulong *minSize,
-                                ulong *maxSize);
-} VISORCHIPSET_BUSDEV_NOTIFIERS;
+struct visorchipset_busdev_notifiers {
+       void (*bus_create)(ulong bus_no);
+       void (*bus_destroy)(ulong bus_no);
+       void (*device_create)(ulong bus_no, ulong dev_no);
+       void (*device_destroy)(ulong bus_no, ulong dev_no);
+       void (*device_pause)(ulong bus_no, ulong dev_no);
+       void (*device_resume)(ulong bus_no, ulong dev_no);
+       int (*get_channel_info)(uuid_le type_uuid, ulong *min_size,
+                               ulong *max_size);
+};
 
 /*  These functions live inside visorchipset, and will be called to indicate
  *  responses to specific events (by code outside of visorchipset).
@@ -250,9 +250,10 @@ typedef struct {
  *  responses.
  */
 void
-visorchipset_register_busdev_client(VISORCHIPSET_BUSDEV_NOTIFIERS *notifiers,
-                                   VISORCHIPSET_BUSDEV_RESPONDERS *responders,
-                                   struct ultra_vbus_deviceinfo *driverInfo);
+visorchipset_register_busdev_client(
+                       struct visorchipset_busdev_notifiers *notifiers,
+                       VISORCHIPSET_BUSDEV_RESPONDERS *responders,
+                       struct ultra_vbus_deviceinfo *driverInfo);
 
 /** Register functions (in the bus driver) to get called by visorchipset
  *  whenever a bus or device appears for which this service partition is
@@ -261,9 +262,10 @@ visorchipset_register_busdev_client(VISORCHIPSET_BUSDEV_NOTIFIERS *notifiers,
  *  responses.
  */
 void
-visorchipset_register_busdev_server(VISORCHIPSET_BUSDEV_NOTIFIERS *notifiers,
-                                   VISORCHIPSET_BUSDEV_RESPONDERS *responders,
-                                   struct ultra_vbus_deviceinfo *driverInfo);
+visorchipset_register_busdev_server(
+                       struct visorchipset_busdev_notifiers *notifiers,
+                       VISORCHIPSET_BUSDEV_RESPONDERS *responders,
+                       struct ultra_vbus_deviceinfo *driverInfo);
 
 typedef void (*SPARREPORTEVENT_COMPLETE_FUNC) (struct controlvm_message *msg,
                                               int status);
index 5f3d6cd..ee0c88a 100644 (file)
@@ -230,8 +230,8 @@ static void parahotplug_process_list(void);
 /* Manages the info for a CONTROLVM_DUMP_CAPTURESTATE /
  * CONTROLVM_REPORTEVENT.
  */
-static VISORCHIPSET_BUSDEV_NOTIFIERS BusDev_Server_Notifiers;
-static VISORCHIPSET_BUSDEV_NOTIFIERS BusDev_Client_Notifiers;
+static struct visorchipset_busdev_notifiers BusDev_Server_Notifiers;
+static struct visorchipset_busdev_notifiers BusDev_Client_Notifiers;
 
 static void bus_create_response(ulong busNo, int response);
 static void bus_destroy_response(ulong busNo, int response);
@@ -589,9 +589,10 @@ clear_chipset_events(void)
 }
 
 void
-visorchipset_register_busdev_server(VISORCHIPSET_BUSDEV_NOTIFIERS *notifiers,
-                                   VISORCHIPSET_BUSDEV_RESPONDERS *responders,
-                                   struct ultra_vbus_deviceinfo *driverInfo)
+visorchipset_register_busdev_server(
+                       struct visorchipset_busdev_notifiers *notifiers,
+                       VISORCHIPSET_BUSDEV_RESPONDERS *responders,
+                       struct ultra_vbus_deviceinfo *driverInfo)
 {
        down(&NotifierLock);
        if (notifiers == NULL) {
@@ -613,9 +614,10 @@ visorchipset_register_busdev_server(VISORCHIPSET_BUSDEV_NOTIFIERS *notifiers,
 EXPORT_SYMBOL_GPL(visorchipset_register_busdev_server);
 
 void
-visorchipset_register_busdev_client(VISORCHIPSET_BUSDEV_NOTIFIERS *notifiers,
-                                   VISORCHIPSET_BUSDEV_RESPONDERS *responders,
-                                   struct ultra_vbus_deviceinfo *driverInfo)
+visorchipset_register_busdev_client(
+                       struct visorchipset_busdev_notifiers *notifiers,
+                       VISORCHIPSET_BUSDEV_RESPONDERS *responders,
+                       struct ultra_vbus_deviceinfo *driverInfo)
 {
        down(&NotifierLock);
        if (notifiers == NULL) {
@@ -1003,7 +1005,7 @@ device_epilog(u32 busNo, u32 devNo, struct spar_segment_state state, u32 cmd,
              struct controlvm_message_header *msgHdr, int response,
              BOOL needResponse, BOOL for_visorbus)
 {
-       VISORCHIPSET_BUSDEV_NOTIFIERS *notifiers = NULL;
+       struct visorchipset_busdev_notifiers *notifiers = NULL;
        BOOL notified = FALSE;
 
        struct visorchipset_device_info *pDevInfo =