]> git.baikalelectronics.ru Git - kernel.git/commit
regulator: lp872x: Remove lp872x_dvs_state
authorNathan Chancellor <nathan@kernel.org>
Tue, 19 Oct 2021 00:43:35 +0000 (17:43 -0700)
committerMark Brown <broonie@kernel.org>
Thu, 21 Oct 2021 13:17:49 +0000 (14:17 +0100)
commitb7fcbe077d25a63109bc45a00e5ee1983eb9d8d2
tree2fee3513af21daa74d96fa8115ec8e96e270a465
parent7c52e94b934711fc8e57fd69d00423fe9098ce51
regulator: lp872x: Remove lp872x_dvs_state

After this driver was converted to gpiod, clang started warning:

vers/regulator/lp872x.c:689:57: error: implicit conversion from
enumeration type 'enum lp872x_dvs_state' to different enumeration type
'enum gpiod_flags' [-Werror,-Wenum-conversion]
        dvs->gpio = devm_gpiod_get_optional(lp->dev, "ti,dvs", pinstate);
                    ~~~~~~~~~~~~~~~~~~~~~~~                    ^~~~~~~~
1 error generated.

lp872x_dvs_state was updated to have values from gpiod_flags but this is
not enough to avoid an implicit conversion warning from either GCC or
clang (although GCC enables this warning under -Wextra instead of -Wall
like clang so it is not seen under normal builds).

Eliminate lp872x_dvs_state in favor of using gpiod_flags everywhere so
that there is no more warning about an implicit conversion.

Fixes: 36f6489f9171 ("regulator: lp872x: replacing legacy gpio interface for gpiod")
Link: https://github.com/ClangBuiltLinux/linux/issues/1481
Signed-off-by: Nathan Chancellor <nathan@kernel.org>
Link: https://lore.kernel.org/r/20211019004335.193492-1-nathan@kernel.org
Signed-off-by: Mark Brown <broonie@kernel.org>
drivers/regulator/lp872x.c
include/linux/regulator/lp872x.h