Skip to content
Commit 3139ff24 authored by Marek Vasut's avatar Marek Vasut Committed by Jonathan Cameron
Browse files

iio: adc: ti-ads1015: Add static assert to test if shifted realbits fit into storagebits



Add compile-time static_assert wrapper to verify that shifted realbits
fit into storagebits. The macro is implemented in a more generic way so
it can be used to verify other values if required.

Signed-off-by: default avatarMarek Vasut <marex@denx.de>
Reviewed-by: default avatarAndy Shevchenko <andy@kernel.org>
Cc: Daniel Baluta <daniel.baluta@nxp.com>
Link: https://lore.kernel.org/r/20220328194725.149150-7-marex@denx.de
Signed-off-by: default avatarJonathan Cameron <Jonathan.Cameron@huawei.com>
parent f1c9ce0c
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