iio: drop useless assignment of cache_type
cover iio: drop useless assignment of cache_type
Default value is REGCACHE_NONE, no need to assign it explicitly. Fix all IIO drivers that do that.
Andy Shevchenko (3):
iio: light: adux1020: Drop unneeded assignment for cache_type
iio: magnetometer: af8133j: Drop unneeded assignment for cache_type
iio: pressure: zpa2326: Drop unneeded assignment for cache_type
drivers/iio/light/adux1020.c | 1 - drivers/iio/magnetometer/af8133j.c | 1 - drivers/iio/pressure/zpa2326_i2c.c | 1 - drivers/iio/pressure/zpa2326_spi.c | 1 - 4 files changed, 4 deletions(-)
Signature · 1 line
2.43.0.rc1.1336.g36b5255a03ac
PATCH 1/3 iio: light: adux1020: Drop unneeded assignment for cache_type
REGCACHE_NONE is the default type of the cache when not provided. Drop unneeded explicit assignment to it.
Note, it's defined to 0, and if ever be redefined, it will break literally a lot of the drivers, so it very unlikely to happen.
--- drivers/iio/light/adux1020.c | 1 - 1 file changed, 1 deletion(-)
drivers/iio/light/adux1020.c +0 -1
@@ -118,7 +118,6 @@ static const struct regmap_config adux1020_regmap_config = { .reg_bits = 8, .val_bits = 16, .max_register = 0x6F, - .cache_type = REGCACHE_NONE, };static const struct reg_sequence adux1020_def_conf[] = {
Signature · 1 line
2.43.0.rc1.1336.g36b5255a03ac
PATCH 2/3 iio: magnetometer: af8133j: Drop unneeded assignment for cache_type
In reply to Andy ShevchenkoREGCACHE_NONE is the default type of the cache when not provided. Drop unneeded explicit assignment to it.
Note, it's defined to 0, and if ever be redefined, it will break literally a lot of the drivers, so it very unlikely to happen.
--- drivers/iio/magnetometer/af8133j.c | 1 - 1 file changed, 1 deletion(-)
drivers/iio/magnetometer/af8133j.c +0 -1
@@ -383,7 +383,6 @@ static const struct regmap_config af8133j_regmap_config = { .reg_bits = 8, .val_bits = 8, .max_register = AF8133J_REG_SWR, - .cache_type = REGCACHE_NONE, };static void af8133j_power_down_action (void *ptr)
Signature · 1 line
2.43.0.rc1.1336.g36b5255a03ac
PATCH 3/3 iio: pressure: zpa2326: Drop unneeded assignment for cache_type
In reply to Andy ShevchenkoREGCACHE_NONE is the default type of the cache when not provided. Drop unneeded explicit assignment to it.
Note, it's defined to 0, and if ever be redefined, it will break literally a lot of the drivers, so it very unlikely to happen.
--- drivers/iio/pressure/zpa2326_i2c.c | 1 - drivers/iio/pressure/zpa2326_spi.c | 1 - 2 files changed, 2 deletions(-)
drivers/iio/pressure/zpa2326_i2c.c +0 -1
@@ -25,7 +25,6 @@ static const struct regmap_config zpa2326_regmap_i2c_config = { .precious_reg = zpa2326_isreg_precious, .max_register = ZPA2326_TEMP_OUT_H_REG, .read_flag_mask = BIT(7), - .cache_type = REGCACHE_NONE, };static unsigned int zpa2326_i2c_hwid (const struct i2c_client *client)
drivers/iio/pressure/zpa2326_spi.c +0 -1
@@ -26,7 +26,6 @@ static const struct regmap_config zpa2326_regmap_spi_config = { .precious_reg = zpa2326_isreg_precious, .max_register = ZPA2326_TEMP_OUT_H_REG, .read_flag_mask = BIT(7) | BIT(6), - .cache_type = REGCACHE_NONE, };static int zpa2326_probe_spi (struct spi_device *spi)
Signature · 1 line
2.43.0.rc1.1336.g36b5255a03ac
Quoted 8 lines · Andy Shevchenko
Default value is
REGCACHE_NONE, no need to assign it explicitly. Fix all IIO drivers that do that.Andy Shevchenko (3):
iio: light: adux1020: Drop unneeded assignment forcache_type
iio: magnetometer: af8133j: Drop unneeded assignment forcache_type
iio: pressure: zpa2326: Drop unneeded assignment forcache_type
Quoted 6 lines
drivers/iio/light/adux1020.c | 1 -
drivers/iio/magnetometer/af8133j.c | 1 - drivers/iio/pressure/zpa2326_i2c.c | 1 - drivers/iio/pressure/zpa2326_spi.c | 1 - 4 files changed, 4 deletions(-)
Quoted 9 lines · On Thu, 30 Jan 2025 08:30:47 +0000 Nuno Sá <[email protected]> wrote:
Quoted 8 lines · Andy Shevchenko
Default value is
REGCACHE_NONE, no need to assign it explicitly. Fix all IIO drivers that do that.Andy Shevchenko (3):
iio: light: adux1020: Drop unneeded assignment forcache_type
iio: magnetometer: af8133j: Drop unneeded assignment forcache_type
iio: pressure: zpa2326: Drop unneeded assignment forcache_type
Quoted 8 lines
Quoted 6 lines
drivers/iio/light/adux1020.c | 1 -
drivers/iio/magnetometer/af8133j.c | 1 - drivers/iio/pressure/zpa2326_i2c.c | 1 - drivers/iio/pressure/zpa2326_spi.c | 1 - 4 files changed, 4 deletions(-)Reviewed-by Nuno Sá <[email protected]>
Applied.
Thanks,
Jonathan