Commit 2e8bd34a authored by Andy Shevchenko's avatar Andy Shevchenko Committed by Jonathan Cameron

iio: accel: st_accel: Mark default_accel_pdata with __maybe_unused

Since we put static variable to a header file it's copied to each module
that includes the header. But not all of them are actually used it.

Mark default_accel_pdata with __maybe_unused to calm a compiler down:

In file included from drivers/iio/accel/st_accel_i2c.c:19:
drivers/iio/accel/st_accel.h:67:46: warning: ‘default_accel_pdata’ defined but not used [-Wunused-const-variable=]
   67 | static const struct st_sensors_platform_data default_accel_pdata = {
      |                                              ^~~~~~~~~~~~~~~~~~~
...
Signed-off-by: default avatarAndy Shevchenko <andriy.shevchenko@linux.intel.com>
Signed-off-by: default avatarJonathan Cameron <Jonathan.Cameron@huawei.com>
parent f22b1d75
...@@ -64,7 +64,7 @@ enum st_accel_type { ...@@ -64,7 +64,7 @@ enum st_accel_type {
* struct st_sensors_platform_data - default accel platform data * struct st_sensors_platform_data - default accel platform data
* @drdy_int_pin: default accel DRDY is available on INT1 pin. * @drdy_int_pin: default accel DRDY is available on INT1 pin.
*/ */
static const struct st_sensors_platform_data default_accel_pdata = { static __maybe_unused const struct st_sensors_platform_data default_accel_pdata = {
.drdy_int_pin = 1, .drdy_int_pin = 1,
}; };
......
Markdown is supported
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