diff options
author | Krzysztof Kozlowski <k.kozlowski@samsung.com> | 2016-02-18 03:35:07 +0300 |
---|---|---|
committer | Mark Brown <broonie@kernel.org> | 2016-02-18 16:34:26 +0300 |
commit | 297eaaa6d0bf09a91045e1d8c9b1e555d8b91d8a (patch) | |
tree | 9a0c1e83b05c6b40d9ac00b101023f91e171db44 /drivers/regulator/of_regulator.c | |
parent | 92e963f50fc74041b5e9e744c330dca48e04f08d (diff) | |
download | linux-297eaaa6d0bf09a91045e1d8c9b1e555d8b91d8a.tar.xz |
regulator: s2mps11: Simplify expression used in BUILD_BUG_ON
Following BUILD_BUG_ON using a variable fails for some of the compilers
and optimization levels (reported for gcc 4.9):
var = ARRAY_SIZE(s2mps15_regulators);
BUILD_BUG_ON(S2MPS_REGULATOR_MAX < var);
Fix this by using ARRAY_SIZE directly.
Additionally add missing BUILD_BUG_ON check for S2MPS15 device (the
check ensures that internal arrays are big enough to hold data for all
of regulators on all devices).
Reported-by: Arnd Bergmann <arnd@arndb.de>
Signed-off-by: Krzysztof Kozlowski <k.kozlowski@samsung.com>
Tested-by: Arnd Bergmann <arnd@arndb.de>
Reviewed-by: Arnd Bergmann <arnd@arndb.de>
Signed-off-by: Mark Brown <broonie@kernel.org>
Diffstat (limited to 'drivers/regulator/of_regulator.c')
0 files changed, 0 insertions, 0 deletions