diff mbox series

nvmem: core: remove unused nvmem_device ncells member

Message ID 20180626113640.24825-1-srinivas.kandagatla@linaro.org
State Accepted
Commit fc82975aea38da8d605ff2fae3f871ac2929b67d
Headers show
Series nvmem: core: remove unused nvmem_device ncells member | expand

Commit Message

Srinivas Kandagatla June 26, 2018, 11:36 a.m. UTC
nvmem ncells can be over written by calling nvmem_add_cells()
multiple times. I see there is no real point of maintaining count
of cells when we have a list of cell.

Remove this to avoid any confusion!

Signed-off-by: Srinivas Kandagatla <srinivas.kandagatla@linaro.org>

---
 drivers/nvmem/core.c | 2 --
 1 file changed, 2 deletions(-)

-- 
2.16.2
diff mbox series

Patch

diff --git a/drivers/nvmem/core.c b/drivers/nvmem/core.c
index b5b0cdc21d01..34b71b1c69f4 100644
--- a/drivers/nvmem/core.c
+++ b/drivers/nvmem/core.c
@@ -31,7 +31,6 @@  struct nvmem_device {
 	struct device		dev;
 	int			stride;
 	int			word_size;
-	int			ncells;
 	int			id;
 	int			users;
 	size_t			size;
@@ -389,7 +388,6 @@  int nvmem_add_cells(struct nvmem_device *nvmem,
 		nvmem_cell_add(cells[i]);
 	}
 
-	nvmem->ncells = ncells;
 	/* remove tmp array */
 	kfree(cells);