[PATCH 08/30] staging: unisys: changes needs_lock from bool to int

Benjamin Romer benjamin.romer at unisys.com
Tue Feb 10 17:58:42 UTC 2015


From: Erik Arfvidson <erik.arfvidson at unisys.com>

This patch changes needs_lock from bool to int. As a result this changes
variable needs_lock inside function visorchannel_create_guts.

Signed-off-by: Erik Arfvidson <erik.arfvidson at unisys.com>
Signed-off-by: Benjamin Romer <benjamin.romer at unisys.com>
---
 drivers/staging/unisys/visorchannel/visorchannel_funcs.c | 12 ++++++------
 1 file changed, 6 insertions(+), 6 deletions(-)

diff --git a/drivers/staging/unisys/visorchannel/visorchannel_funcs.c b/drivers/staging/unisys/visorchannel/visorchannel_funcs.c
index 3c13276..3ccd7f9 100644
--- a/drivers/staging/unisys/visorchannel/visorchannel_funcs.c
+++ b/drivers/staging/unisys/visorchannel/visorchannel_funcs.c
@@ -33,7 +33,7 @@ struct visorchannel {
 	struct channel_header chan_hdr;
 	uuid_le guid;
 	ulong size;
-	BOOL needs_lock;	/* channel creator knows if more than one
+	int needs_lock;	/* channel creator knows if more than one
 				 * thread will be inserting or removing */
 	spinlock_t insert_lock; /* protect head writes in chan_hdr */
 	spinlock_t remove_lock;	/* protect tail writes in chan_hdr */
@@ -52,7 +52,7 @@ struct visorchannel {
 static struct visorchannel *
 visorchannel_create_guts(HOSTADDRESS physaddr, ulong channel_bytes,
 			 struct visorchannel *parent, ulong off, uuid_le guid,
-			 BOOL needs_lock)
+			 int needs_lock)
 {
 	struct visorchannel *p = NULL;
 	void *rc = NULL;
@@ -118,7 +118,7 @@ struct visorchannel *
 visorchannel_create(HOSTADDRESS physaddr, ulong channel_bytes, uuid_le guid)
 {
 	return visorchannel_create_guts(physaddr, channel_bytes, NULL, 0, guid,
-					FALSE);
+					0);
 }
 EXPORT_SYMBOL_GPL(visorchannel_create);
 
@@ -127,7 +127,7 @@ visorchannel_create_with_lock(HOSTADDRESS physaddr, ulong channel_bytes,
 			      uuid_le guid)
 {
 	return visorchannel_create_guts(physaddr, channel_bytes, NULL, 0, guid,
-					TRUE);
+					1);
 }
 EXPORT_SYMBOL_GPL(visorchannel_create_with_lock);
 
@@ -137,7 +137,7 @@ visorchannel_create_overlapped(ulong channel_bytes,
 			       uuid_le guid)
 {
 	return visorchannel_create_guts(0, channel_bytes, parent, off, guid,
-					FALSE);
+					0);
 }
 EXPORT_SYMBOL_GPL(visorchannel_create_overlapped);
 
@@ -147,7 +147,7 @@ visorchannel_create_overlapped_with_lock(ulong channel_bytes,
 					 uuid_le guid)
 {
 	return visorchannel_create_guts(0, channel_bytes, parent, off, guid,
-					TRUE);
+					1);
 }
 EXPORT_SYMBOL_GPL(visorchannel_create_overlapped_with_lock);
 
-- 
2.1.0



More information about the devel mailing list