eeprom: at24: also select REGMAP
Subsystems (2)
PATCH 1/1 eeprom: at24: also select REGMAP
Selecting only REGMAP_I2C can leave REGMAP unset, causing build errors, so also select REGMAP to prevent the build errors.
../drivers/misc/eeprom/at24.c:540:42: warning: 'struct regmap_config' declared inside parameter list will not be visible outside of this definition or declaration
540 | struct regmap_config *regmap_config)../drivers/misc/eeprom/at24.c: In function 'at24_make_dummy_client':../drivers/misc/eeprom/at24.c:552:18: error: implicit declaration of function 'devm_regmap_init_i2c' [-Werror=implicit-function-declaration]
552 | regmap = devm_regmap_init_i2c(dummy_client, regmap_config);../drivers/misc/eeprom/at24.c:552:16: warning: assignment to 'struct regmap *' from 'int' makes pointer from integer without a cast [-Wint-conversion]
552 | regmap = devm_regmap_init_i2c(dummy_client, regmap_config);../drivers/misc/eeprom/at24.c: In function 'at24_probe':../drivers/misc/eeprom/at24.c:586:16: error: variable 'regmap_config' has initializer but incomplete type
586 | struct regmap_config regmap_config = { };../drivers/misc/eeprom/at24.c:586:30: error: storage size of 'regmap_config' isn't known
586 | struct regmap_config regmap_config = { };../drivers/misc/eeprom/at24.c:586:30: warning: unused variable 'regmap_config' [-Wunused-variable]
--- drivers/misc/eeprom/Kconfig | 1 + 1 file changed, 1 insertion(+)
drivers/misc/eeprom/Kconfig +1 -0
@@ -6,6 +6,7 @@ config EEPROM_AT24 depends on I2C && SYSFS select NVMEM select NVMEM_SYSFS + select REGMAP select REGMAP_I2C help Enable this driver to get read/write support to most I2C EEPROMs
Bartosz Golaszewski
AppliedQuoted 35 lines · Randy Dunlap
Selecting only
REGMAP_I2Ccan leave REGMAP unset, causing build errors, so also select REGMAP to prevent the build errors.
../drivers/misc/eeprom/at24.c:540:42: warning: 'structregmap_config' declared inside parameter list will not be visible outside of this definition or declaration
540 | structregmap_config*regmap_config)../drivers/misc/eeprom/at24.c: In function 'at24_make_dummy_client':../drivers/misc/eeprom/at24.c:552:18: error: implicit declaration of function 'devm_regmap_init_i2c' [-Werror=implicit-function-declaration]
552 | regmap =devm_regmap_init_i2c(dummy_client, regmap_config);../drivers/misc/eeprom/at24.c:552:16: warning: assignment to 'struct regmap *' from 'int' makes pointer from integer without a cast [-Wint-conversion]
552 | regmap =devm_regmap_init_i2c(dummy_client, regmap_config);../drivers/misc/eeprom/at24.c: In function 'at24_probe':../drivers/misc/eeprom/at24.c:586:16: error: variable 'regmap_config' has initializer but incomplete type
586 | structregmap_configregmap_config= { };../drivers/misc/eeprom/at24.c:586:30: error: storage size of 'regmap_config' isn't known
586 | structregmap_configregmap_config= { };../drivers/misc/eeprom/at24.c:586:30: warning: unused variable 'regmap_config' [-Wunused-variable]Fixes 5c015258478e ("eeprom: at24: add basic regmap_i2c support")Signed-off-by Randy Dunlap <[email protected]>Cc Heiner Kallweit <[email protected]>Cc Bartosz Golaszewski <[email protected]>Cc Arnd Bergmann <[email protected]>Cc Mark Brown <[email protected]>Cc Greg Kroah-Hartman <[email protected]>Cc Masahiro Yamada <[email protected]>--- drivers/misc/eeprom/Kconfig | 1 + 1 file changed, 1 insertion(+)diff -- a/drivers/misc/eeprom/Kconfig b/drivers/misc/eeprom/Kconfig
drivers/misc/eeprom/Kconfig config EEPROM_AT24 · line 12
Quoted 7 lines
drivers/misc/eeprom/Kconfig +1
-0@@ -6,6 +6,7 @@ config EEPROM_AT24 depends on I2C && SYSFS select NVMEM select NVMEM_SYSFS + select REGMAP select REGMAP_I2C help Enable this driver to get read/write support to most I2C EEPROMs
Applied, thanks!
Bart