]> git.baikalelectronics.ru Git - kernel.git/commitdiff
macintosh/ams-input: Use true and false for boolean values
authorGustavo A. R. Silva <gustavo@embeddedor.com>
Wed, 24 Jan 2018 01:48:46 +0000 (19:48 -0600)
committerMichael Ellerman <mpe@ellerman.id.au>
Sun, 28 Jan 2018 06:21:17 +0000 (17:21 +1100)
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>
Reviewed-by: Michael Hanselmann <public@hansmi.ch>
Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
drivers/macintosh/ams/ams-input.c

index 2edae7dfcab25407c4c677bcfad6e4f3bdf4e57f..fe248f6a30c1ac0ebe5907ab60194cf45c018544 100644 (file)
@@ -91,7 +91,7 @@ static int ams_input_enable(void)
                return error;
        }
 
-       joystick = 1;
+       joystick = true;
 
        return 0;
 }
@@ -104,7 +104,7 @@ static void ams_input_disable(void)
                ams_info.idev = NULL;
        }
 
-       joystick = 0;
+       joystick = false;
 }
 
 static ssize_t ams_input_show_joystick(struct device *dev,