未验证 提交 e680a409 编写于 作者: B Bartosz Golaszewski 提交者: Mark Brown

regmap: fix the kerneldoc for regmap_test_bits()

The kerneldoc comment for regmap_test_bits() says that it returns -1 on
regmap_read() failure. This is not true - it will propagate the error
code returned by regmap_read(). Fix it.

Fixes: aa2ff9db ("regmap: provide helpers for simple bit operations")
Signed-off-by: NBartosz Golaszewski <bgolaszewski@baylibre.com>
Link: https://lore.kernel.org/r/20200607093421.22209-1-brgl@bgdev.plSigned-off-by: NMark Brown <broonie@kernel.org>
上级 53d86095
......@@ -2936,8 +2936,9 @@ EXPORT_SYMBOL_GPL(regmap_update_bits_base);
* @reg: Register to read from
* @bits: Bits to test
*
* Returns -1 if the underlying regmap_read() fails, 0 if at least one of the
* tested bits is not set and 1 if all tested bits are set.
* Returns 0 if at least one of the tested bits is not set, 1 if all tested
* bits are set and a negative error number if the underlying regmap_read()
* fails.
*/
int regmap_test_bits(struct regmap *map, unsigned int reg, unsigned int bits)
{
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册