iio: gyro: fxas21002c: Move 'fxas21002c_reg_fields' to the only file its used
authorLee Jones <lee.jones@linaro.org>
Fri, 17 Jul 2020 16:55:26 +0000 (17:55 +0100)
committerJonathan Cameron <Jonathan.Cameron@huawei.com>
Mon, 20 Jul 2020 08:03:25 +0000 (09:03 +0100)
commitbfec57537f5787135401badefab0a2db240b48d4
treef62d761e135aa5cd789862b2f399f014092f0580
parentfb37b5f8717f822a7841f744ea0fcb1a82edaad8
iio: gyro: fxas21002c: Move 'fxas21002c_reg_fields' to the only file its used

'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: Lee Jones <lee.jones@linaro.org>
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
drivers/iio/gyro/fxas21002c.h
drivers/iio/gyro/fxas21002c_core.c