mirror of https://gitee.com/openkylin/linux.git
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: Gustavo A. R. Silva <gustavo@embeddedor.com> Acked-by: Charles Keepax <ckeepax@opensource.cirrus.com> Signed-off-by: Mark Brown <broonie@kernel.org>
This commit is contained in:
parent
1752a35acd
commit
380ae4ec42
|
@ -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)
|
||||||
(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)
|
||||||
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)
|
||||||
(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;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue