• Lee Jones's avatar
    iio: gyro: fxas21002c: Move 'fxas21002c_reg_fields' to the only file its used · bfec5753
    Lee Jones authored
    'fxas21002c_reg_fields' is only used in '*core*', meaning that '*i2c*'
    and '*spi*' complain of a defined but not used const variable.  Let's
    move it into the source file.
    
    Fixes the following W=1 kernel build warning(s):
    
     In file included from drivers/iio/gyro/fxas21002c_i2c.c:14:
     drivers/iio/gyro/fxas21002c.h:79:31: warning: ‘fxas21002c_reg_fields’ defined but not used [-Wunused-const-variable=]
     79 | static const struct reg_field fxas21002c_reg_fields[] = {
     | ^~~~~~~~~~~~~~~~~~~~~
     In file included from drivers/iio/gyro/fxas21002c_spi.c:14:
     drivers/iio/gyro/fxas21002c.h:79:31: warning: ‘fxas21002c_reg_fields’ defined but not used [-Wunused-const-variable=]
     79 | static const struct reg_field fxas21002c_reg_fields[] = {
     | ^~~~~~~~~~~~~~~~~~~~~
    
    Cc: Rui Miguel Silva <rmfrfs@gmail.com>
    Signed-off-by: default avatarLee Jones <lee.jones@linaro.org>
    Signed-off-by: default avatarJonathan Cameron <Jonathan.Cameron@huawei.com>
    bfec5753
fxas21002c.h 2.12 KB