Skip to content

Commit

Permalink
nvmem: qfprom: remove incorrect write support
Browse files Browse the repository at this point in the history
qfprom has different address spaces for read and write. Reads are
always done from corrected address space, where as writes are done
on raw address space.
Writing to corrected address space is invalid and ignored, so it
does not make sense to have this support in the driver which only
supports corrected address space regions at the moment.

Fixes: 4ab1199 ("nvmem: qfprom: Add Qualcomm QFPROM support.")
Signed-off-by: Srinivas Kandagatla <srinivas.kandagatla@linaro.org>
Reviewed-by: Douglas Anderson <dianders@chromium.org>
Cc: stable <stable@vger.kernel.org>
Link: https://lore.kernel.org/r/20200522113341.7728-1-srinivas.kandagatla@linaro.org
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
  • Loading branch information
Srinivas Kandagatla authored and Greg Kroah-Hartman committed May 27, 2020
1 parent 18cbc33 commit 8d9eb0d
Showing 1 changed file with 0 additions and 14 deletions.
14 changes: 0 additions & 14 deletions drivers/nvmem/qfprom.c
Original file line number Diff line number Diff line change
Expand Up @@ -27,25 +27,11 @@ static int qfprom_reg_read(void *context,
return 0;
}

static int qfprom_reg_write(void *context,
unsigned int reg, void *_val, size_t bytes)
{
struct qfprom_priv *priv = context;
u8 *val = _val;
int i = 0, words = bytes;

while (words--)
writeb(*val++, priv->base + reg + i++);

return 0;
}

static struct nvmem_config econfig = {
.name = "qfprom",
.stride = 1,
.word_size = 1,
.reg_read = qfprom_reg_read,
.reg_write = qfprom_reg_write,
};

static int qfprom_probe(struct platform_device *pdev)
Expand Down

0 comments on commit 8d9eb0d

Please sign in to comment.