Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit fc82975a authored by Srinivas Kandagatla's avatar Srinivas Kandagatla Committed by Greg Kroah-Hartman
Browse files

nvmem: core: remove unused nvmem_device ncells member



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: default avatarSrinivas Kandagatla <srinivas.kandagatla@linaro.org>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent 26d79b82
Loading
Loading
Loading
Loading
+0 −2
Original line number Diff line number Diff line
@@ -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);