This series contains what I hope to be a non-controversial refactoring of the at24 eeprom driver. Most changes revolve around at24_probe() which became quite complicated and hard to read. The only functional changes are: disabling the internal locking mechanisms of regmap (since we already take care of that in the driver) and removing an if checking if byte_len is a power of 2 (as we do support models for which it's not true). All other patches affect readability and code structure. Tested with a couple models and different both for device tree and platform data modes. Bartosz Golaszewski (21): eeprom: at24: disable regmap locking eeprom: at24: remove nvmem_config from at24_data eeprom: at24: arrange local variables eeprom: at24: use SPDX identifier instead of GPL boiler-plate eeprom: at24: remove code separators eeprom: at24: drop redundant variable in at24_read() eeprom: at24: drop redundant variable in at24_write() eeprom: at24: make struct initialization uniform in at24_probe() eeprom: at24: don't check if byte_len is a power of 2 eeprom: at24: rename at24_get_pdata() eeprom: at24: rename chip to pdata in at24_probe() eeprom: at24: use a helper variable for dev eeprom: at24: readability tweak in at24_probe() eeprom: at24: provide and use at24_base_client_dev() eeprom: at24: switch to using probe_new() from the i2c framework eeprom: at24: move platform data processing into a separate routine eeprom: at24: remove at24_platform_data from at24_data eeprom: at24: refactor at24_probe() eeprom: at24: tweak newlines eeprom: at24: fix a line break eeprom: at24: simplify the i2c functionality checking drivers/misc/eeprom/at24.c | 293 ++++++++++++++++++++++++--------------------- 1 file changed, 156 insertions(+), 137 deletions(-) -- 2.16.1