[PATCH 281/641] Staging: hv: vmbus.h coding style cleanups

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Coding style fixes for vmbus.h

Cc: Hank Janssen <hjanssen@xxxxxxxxxxxxx>
Signed-off-by: Greg Kroah-Hartman <gregkh@xxxxxxx>
---
 drivers/staging/hv/vmbus.h |   54 ++++++++++++++-----------------------------
 1 files changed, 18 insertions(+), 36 deletions(-)

diff --git a/drivers/staging/hv/vmbus.h b/drivers/staging/hv/vmbus.h
index 44a784c..733edc9 100644
--- a/drivers/staging/hv/vmbus.h
+++ b/drivers/staging/hv/vmbus.h
@@ -29,71 +29,53 @@
 
 #include "include/VmbusApi.h"
 
-
-/* Data types */
-
-
 typedef int (*PFN_DRIVERINITIALIZE)(struct hv_driver *drv);
 typedef int (*PFN_DRIVEREXIT)(struct hv_driver *drv);
 
 struct driver_context {
 	struct hv_guid class_id;
 
-	struct device_driver	driver;
+	struct device_driver driver;
 
-	/* Use these methods instead of the struct device_driver so 2.6 kernel stops complaining */
+	/*
+	 * Use these methods instead of the struct device_driver so 2.6 kernel
+	 * stops complaining
+	 * TODO - fix this!
+	 */
 	int (*probe)(struct device *);
 	int (*remove)(struct device *);
 	void (*shutdown)(struct device *);
 };
 
 struct device_context {
-	struct work_struct              probe_failed_work_item;
+	struct work_struct probe_failed_work_item;
 	struct hv_guid class_id;
 	struct hv_guid device_id;
-	int						probe_error;
-	struct device			device;
+	int probe_error;
+	struct device device;
 	struct hv_device device_obj;
 };
 
-
-
-/* Global */
-
-
-
-/* Inlines */
-
-static inline struct device_context *to_device_context(struct hv_device *device_obj)
+static inline struct device_context *to_device_context(struct hv_device *d)
 {
-	return container_of(device_obj, struct device_context, device_obj);
+	return container_of(d, struct device_context, device_obj);
 }
 
-static inline struct device_context *device_to_device_context(struct device *device)
+static inline struct device_context *device_to_device_context(struct device *d)
 {
-	return container_of(device, struct device_context, device);
+	return container_of(d, struct device_context, device);
 }
 
-static inline struct driver_context *driver_to_driver_context(struct device_driver *driver)
+static inline struct driver_context *driver_to_driver_context(struct device_driver *d)
 {
-	return container_of(driver, struct driver_context, driver);
+	return container_of(d, struct driver_context, driver);
 }
 
 
 /* Vmbus interface */
 
-int vmbus_child_driver_register(
-	struct driver_context* driver_ctx
-	);
-
-void
-vmbus_child_driver_unregister(
-	struct driver_context *driver_ctx
-	);
-
-void
-vmbus_get_interface(
-	VMBUS_CHANNEL_INTERFACE *interface
-	);
+int vmbus_child_driver_register(struct driver_context *driver_ctx);
+void vmbus_child_driver_unregister(struct driver_context *driver_ctx);
+void vmbus_get_interface(VMBUS_CHANNEL_INTERFACE *interface);
 
 #endif /* _VMBUS_H_ */
-- 
1.6.4.2

_______________________________________________
devel mailing list
devel@xxxxxxxxxxxxxxxxxxxxxx
http://driverdev.linuxdriverproject.org/mailman/listinfo/devel

[Index of Archives]     [Linux Driver Backports]     [DMA Engine]     [Linux GPIO]     [Linux SPI]     [Video for Linux]     [Linux USB Devel]     [Linux Coverity]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [Yosemite Backpacking]
  Powered by Linux