iio:accel:bmc150: Mark structure __maybe_unused as only needed with for pm ops.
authorJonathan Cameron <Jonathan.Cameron@huawei.com>
Sun, 28 Nov 2021 17:24:44 +0000 (17:24 +0000)
committerJonathan Cameron <Jonathan.Cameron@huawei.com>
Tue, 21 Dec 2021 15:10:09 +0000 (15:10 +0000)
If CONFIG_PM not set then clang warns this structure is unused.

Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
Cc: Stephan Gerhold <stephan@gerhold.net>
Reviewed-by: Nathan Chancellor <nathan@kernel.org>
Link: https://lore.kernel.org/r/20211128172445.2616166-12-jic23@kernel.org
drivers/iio/accel/bmc150-accel-core.c

index b0678c351e829336b891441d499cfac59b2fc04d..e6081dd0a8800cd0787b55f847d523a59bc2151a 100644 (file)
@@ -170,7 +170,7 @@ static const struct {
                                     {1000, 0, 0x0E},
                                     {2000, 0, 0x0F} };
 
-static const struct {
+static __maybe_unused const struct {
        int bw_bits;
        int msec;
 } bmc150_accel_sample_upd_time[] = { {0x08, 64},