Messages in this thread Patch in this message | | | From | Andy Shevchenko <> | Subject | [PATCH v1 3/5] regmap: mmio: Remove mmio_relaxed member from context | Date | Fri, 5 Aug 2022 23:53:19 +0300 |
| |
There is no need to keep mmio_relaxed member in the context, it's onetime used during generation of the context. Remove it.
Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> --- drivers/base/regmap/regmap-mmio.c | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-)
diff --git a/drivers/base/regmap/regmap-mmio.c b/drivers/base/regmap/regmap-mmio.c index e1923506a89a..c2b18973144b 100644 --- a/drivers/base/regmap/regmap-mmio.c +++ b/drivers/base/regmap/regmap-mmio.c @@ -16,7 +16,6 @@ struct regmap_mmio_context { void __iomem *regs; unsigned int val_bytes; - bool relaxed_mmio; bool attached_clk; struct clk *clk; @@ -283,7 +282,6 @@ static struct regmap_mmio_context *regmap_mmio_gen_context(struct device *dev, ctx->regs = regs; ctx->val_bytes = config->val_bits / 8; - ctx->relaxed_mmio = config->use_relaxed_mmio; switch (regmap_get_val_endian(dev, ®map_mmio, config)) { case REGMAP_ENDIAN_DEFAULT: @@ -293,7 +291,7 @@ static struct regmap_mmio_context *regmap_mmio_gen_context(struct device *dev, #endif switch (config->val_bits) { case 8: - if (ctx->relaxed_mmio) { + if (config->use_relaxed_mmio) { ctx->reg_read = regmap_mmio_read8_relaxed; ctx->reg_write = regmap_mmio_write8_relaxed; } else { @@ -302,7 +300,7 @@ static struct regmap_mmio_context *regmap_mmio_gen_context(struct device *dev, } break; case 16: - if (ctx->relaxed_mmio) { + if (config->use_relaxed_mmio) { ctx->reg_read = regmap_mmio_read16le_relaxed; ctx->reg_write = regmap_mmio_write16le_relaxed; } else { @@ -311,7 +309,7 @@ static struct regmap_mmio_context *regmap_mmio_gen_context(struct device *dev, } break; case 32: - if (ctx->relaxed_mmio) { + if (config->use_relaxed_mmio) { ctx->reg_read = regmap_mmio_read32le_relaxed; ctx->reg_write = regmap_mmio_write32le_relaxed; } else { @@ -321,7 +319,7 @@ static struct regmap_mmio_context *regmap_mmio_gen_context(struct device *dev, break; #ifdef CONFIG_64BIT case 64: - if (ctx->relaxed_mmio) { + if (config->use_relaxed_mmio) { ctx->reg_read = regmap_mmio_read64le_relaxed; ctx->reg_write = regmap_mmio_write64le_relaxed; } else { -- 2.35.1
| |