Skip to content

Commit fc82975

Browse files
Srinivas-Kandagatlagregkh
authored andcommitted
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: Srinivas Kandagatla <srinivas.kandagatla@linaro.org> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
1 parent 26d79b8 commit fc82975

1 file changed

Lines changed: 0 additions & 2 deletions

File tree

‎drivers/nvmem/core.c‎

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,6 @@ struct nvmem_device {
3131
struct device dev;
3232
int stride;
3333
int word_size;
34-
int ncells;
3534
int id;
3635
int users;
3736
size_t size;
@@ -389,7 +388,6 @@ int nvmem_add_cells(struct nvmem_device *nvmem,
389388
nvmem_cell_add(cells[i]);
390389
}
391390

392-
nvmem->ncells = ncells;
393391
/* remove tmp array */
394392
kfree(cells);
395393

0 commit comments

Comments
 (0)