Input: appletouch - use true and false for boolean values
authorGustavo A. R. Silva <gustavo@embeddedor.com>
Wed, 14 Mar 2018 17:07:32 +0000 (10:07 -0700)
committerDmitry Torokhov <dmitry.torokhov@gmail.com>
Wed, 14 Mar 2018 17:13:08 +0000 (10:13 -0700)
Assign true or false to boolean variables instead of an integer value.

This issue was detected with the help of Coccinelle.

Signed-off-by: Gustavo A. R. Silva <gustavo@embeddedor.com>
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
drivers/input/mouse/appletouch.c

index 81a695d0b4e04600e60f62949bd07ca01fda8062..032d27983b6c25eadb63163fb858275889597701 100644 (file)
@@ -587,7 +587,7 @@ static void atp_complete_geyser_1_2(struct urb *urb)
                /* Perform size detection, if not done already */
                if (unlikely(!dev->size_detect_done)) {
                        atp_detect_size(dev);
-                       dev->size_detect_done = 1;
+                       dev->size_detect_done = true;
                        goto exit;
                }
        }
@@ -813,7 +813,7 @@ static int atp_open(struct input_dev *input)
        if (usb_submit_urb(dev->urb, GFP_ATOMIC))
                return -EIO;
 
-       dev->open = 1;
+       dev->open = true;
        return 0;
 }
 
@@ -823,7 +823,7 @@ static void atp_close(struct input_dev *input)
 
        usb_kill_urb(dev->urb);
        cancel_work_sync(&dev->work);
-       dev->open = 0;
+       dev->open = false;
 }
 
 static int atp_handle_geyser(struct atp *dev)