Commit 380ae4ec authored by Gustavo A. R. Silva's avatar Gustavo A. R. Silva Committed by Mark Brown

ASoC: wm5100-tables: use true and false for boolean values

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: default avatarGustavo A. R. Silva <gustavo@embeddedor.com>
Acked-by: default avatarCharles Keepax <ckeepax@opensource.cirrus.com>
Signed-off-by: default avatarMark Brown <broonie@kernel.org>
parent 1752a35a
...@@ -30,7 +30,7 @@ bool wm5100_volatile_register(struct device *dev, unsigned int reg) ...@@ -30,7 +30,7 @@ bool wm5100_volatile_register(struct device *dev, unsigned int reg)
case WM5100_OUTPUT_STATUS_2: case WM5100_OUTPUT_STATUS_2:
case WM5100_INPUT_ENABLES_STATUS: case WM5100_INPUT_ENABLES_STATUS:
case WM5100_MIC_DETECT_3: case WM5100_MIC_DETECT_3:
return 1; return true;
default: default:
if ((reg >= WM5100_DSP1_PM_0 && reg <= WM5100_DSP1_PM_1535) || if ((reg >= WM5100_DSP1_PM_0 && reg <= WM5100_DSP1_PM_1535) ||
(reg >= WM5100_DSP1_ZM_0 && reg <= WM5100_DSP1_ZM_2047) || (reg >= WM5100_DSP1_ZM_0 && reg <= WM5100_DSP1_ZM_2047) ||
...@@ -41,9 +41,9 @@ bool wm5100_volatile_register(struct device *dev, unsigned int reg) ...@@ -41,9 +41,9 @@ bool wm5100_volatile_register(struct device *dev, unsigned int reg)
(reg >= WM5100_DSP3_PM_0 && reg <= WM5100_DSP3_PM_1535) || (reg >= WM5100_DSP3_PM_0 && reg <= WM5100_DSP3_PM_1535) ||
(reg >= WM5100_DSP3_ZM_0 && reg <= WM5100_DSP3_ZM_2047) || (reg >= WM5100_DSP3_ZM_0 && reg <= WM5100_DSP3_ZM_2047) ||
(reg >= WM5100_DSP3_DM_0 && reg <= WM5100_DSP3_DM_511)) (reg >= WM5100_DSP3_DM_0 && reg <= WM5100_DSP3_DM_511))
return 1; return true;
else else
return 0; return false;
} }
} }
...@@ -798,7 +798,7 @@ bool wm5100_readable_register(struct device *dev, unsigned int reg) ...@@ -798,7 +798,7 @@ bool wm5100_readable_register(struct device *dev, unsigned int reg)
case WM5100_DSP3_CONTROL_28: case WM5100_DSP3_CONTROL_28:
case WM5100_DSP3_CONTROL_29: case WM5100_DSP3_CONTROL_29:
case WM5100_DSP3_CONTROL_30: case WM5100_DSP3_CONTROL_30:
return 1; return true;
default: default:
if ((reg >= WM5100_DSP1_PM_0 && reg <= WM5100_DSP1_PM_1535) || if ((reg >= WM5100_DSP1_PM_0 && reg <= WM5100_DSP1_PM_1535) ||
(reg >= WM5100_DSP1_ZM_0 && reg <= WM5100_DSP1_ZM_2047) || (reg >= WM5100_DSP1_ZM_0 && reg <= WM5100_DSP1_ZM_2047) ||
...@@ -809,9 +809,9 @@ bool wm5100_readable_register(struct device *dev, unsigned int reg) ...@@ -809,9 +809,9 @@ bool wm5100_readable_register(struct device *dev, unsigned int reg)
(reg >= WM5100_DSP3_PM_0 && reg <= WM5100_DSP3_PM_1535) || (reg >= WM5100_DSP3_PM_0 && reg <= WM5100_DSP3_PM_1535) ||
(reg >= WM5100_DSP3_ZM_0 && reg <= WM5100_DSP3_ZM_2047) || (reg >= WM5100_DSP3_ZM_0 && reg <= WM5100_DSP3_ZM_2047) ||
(reg >= WM5100_DSP3_DM_0 && reg <= WM5100_DSP3_DM_511)) (reg >= WM5100_DSP3_DM_0 && reg <= WM5100_DSP3_DM_511))
return 1; return true;
else else
return 0; return false;
} }
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment