]> asedeno.scripts.mit.edu Git - linux.git/commitdiff
ASoC: rt5631: use true and false for boolean values
authorGustavo A. R. Silva <gustavo@embeddedor.com>
Sat, 4 Aug 2018 21:49:55 +0000 (16:49 -0500)
committerMark Brown <broonie@kernel.org>
Mon, 6 Aug 2018 11:35:12 +0000 (12:35 +0100)
Return statements in functions returning bool should use true or false
instead of an integer value.

This code was detected with the help of Coccinelle.

Signed-off-by: Gustavo A. R. Silva <gustavo@embeddedor.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
sound/soc/codecs/rt5631.c

index e52e4670cf65c978822a359ae6bfcf445c08f5a2..865f49ac38dd1c372873fe45b242df050f2f7ffd 100644 (file)
@@ -105,9 +105,9 @@ static bool rt5631_volatile_register(struct device *dev, unsigned int reg)
        case RT5631_INDEX_ADD:
        case RT5631_INDEX_DATA:
        case RT5631_EQ_CTRL:
-               return 1;
+               return true;
        default:
-               return 0;
+               return false;
        }
 }
 
@@ -164,9 +164,9 @@ static bool rt5631_readable_register(struct device *dev, unsigned int reg)
        case RT5631_VENDOR_ID:
        case RT5631_VENDOR_ID1:
        case RT5631_VENDOR_ID2:
-               return 1;
+               return true;
        default:
-               return 0;
+               return false;
        }
 }