]> asedeno.scripts.mit.edu Git - linux.git/commitdiff
ASoC: wm8996: use true and false for boolean values
authorGustavo A. R. Silva <gustavo@embeddedor.com>
Sat, 4 Aug 2018 21:52:35 +0000 (16:52 -0500)
committerMark Brown <broonie@kernel.org>
Mon, 6 Aug 2018 11:35:28 +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>
Acked-by: Charles Keepax <ckeepax@opensource.cirrus.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
sound/soc/codecs/wm8996.c

index 78a408236cfb32c4d07e92d2f32f2f9a9c8d73c9..91711f8958c56245eef728b8fd8309a7370bc44a 100644 (file)
@@ -1498,9 +1498,9 @@ static bool wm8996_readable_register(struct device *dev, unsigned int reg)
        case WM8996_RIGHT_PDM_SPEAKER:
        case WM8996_PDM_SPEAKER_MUTE_SEQUENCE:
        case WM8996_PDM_SPEAKER_VOLUME:
-               return 1;
+               return true;
        default:
-               return 0;
+               return false;
        }
 }
 
@@ -1522,9 +1522,9 @@ static bool wm8996_volatile_register(struct device *dev, unsigned int reg)
        case WM8996_MIC_DETECT_3:
        case WM8996_HEADPHONE_DETECT_1:
        case WM8996_HEADPHONE_DETECT_2:
-               return 1;
+               return true;
        default:
-               return 0;
+               return false;
        }
 }