powerpc: Make open count variables signed in hvcs/hvsi/hvc_console
authorroel kluin <roel.kluin@gmail.com>
Tue, 2 Dec 2008 11:21:43 +0000 (11:21 +0000)
committerPaul Mackerras <paulus@samba.org>
Wed, 3 Dec 2008 10:04:13 +0000 (21:04 +1100)
Otherwise the tests for count < 0 will never be true.

Signed-off-by: Roel Kluin <roel.kluin@gmail.com>
Signed-off-by: Paul Mackerras <paulus@samba.org>
drivers/char/hvc_console.h
drivers/char/hvcs.c
drivers/char/hvsi.c

index 8297dbc..3c85d78 100644 (file)
@@ -48,7 +48,7 @@ struct hvc_struct {
        spinlock_t lock;
        int index;
        struct tty_struct *tty;
-       unsigned int count;
+       int count;
        int do_wakeup;
        char *outbuf;
        int outbuf_size;
index 473d9b1..6e6eb44 100644 (file)
@@ -269,7 +269,7 @@ struct hvcs_struct {
        unsigned int index;
 
        struct tty_struct *tty;
-       unsigned int open_count;
+       int open_count;
 
        /*
         * Used to tell the driver kernel_thread what operations need to take
index 59c6f9a..af05528 100644 (file)
@@ -75,7 +75,7 @@ struct hvsi_struct {
        spinlock_t lock;
        int index;
        struct tty_struct *tty;
-       unsigned int count;
+       int count;
        uint8_t throttle_buf[128];
        uint8_t outbuf[N_OUTBUF]; /* to implement write_room and chars_in_buffer */
        /* inbuf is for packet reassembly. leave a little room for leftovers. */