[PATCH 11/13] staging: comedi: pcmuio: fix types of asics members

H Hartley Sweeten hsweeten at visionengravers.com
Wed Jul 24 18:49:59 UTC 2013


The 'enabled_mask' is a bit mask of the channels that are enabled
for interrupt detection and should be an unsigned int.

The 'stop_count' is a >= 0 value that is set by the unsigned int
cmd->stop_arg. Make it an unsigned int.

The 'active' and 'continuous' members are flags. Make them unsigned
int bit-fields to save a bit of space.

Signed-off-by: H Hartley Sweeten <hsweeten at visionengravers.com>
Cc: Ian Abbott <abbotti at mev.co.uk>
Cc: Greg Kroah-Hartman <gregkh at linuxfoundation.org>
---
 drivers/staging/comedi/drivers/pcmuio.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/drivers/staging/comedi/drivers/pcmuio.c b/drivers/staging/comedi/drivers/pcmuio.c
index b7aa9e5..94d8266 100644
--- a/drivers/staging/comedi/drivers/pcmuio.c
+++ b/drivers/staging/comedi/drivers/pcmuio.c
@@ -131,10 +131,10 @@ struct pcmuio_private {
 	struct {
 		spinlock_t pagelock;	/* protect r/w of page registers */
 		spinlock_t spinlock;	/* protect member variables */
-		int enabled_mask;
-		int active;
-		int stop_count;
-		int continuous;
+		unsigned int enabled_mask;
+		unsigned int stop_count;
+		unsigned int active:1;
+		unsigned int continuous:1;
 	} asics[PCMUIO_MAX_ASICS];
 };
 
-- 
1.8.3.2



More information about the devel mailing list