Skip to content

Commit

Permalink
nvmem: core: remove unused nvmem_device ncells member
Browse files Browse the repository at this point in the history
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 <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>
  • Loading branch information
Srinivas-Kandagatla authored and gregkh committed Jul 7, 2018
1 parent 26d79b8 commit fc82975
Showing 1 changed file with 0 additions and 2 deletions.
2 changes: 0 additions & 2 deletions drivers/nvmem/core.c
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,6 @@ struct nvmem_device {
struct device dev;
int stride;
int word_size;
int ncells;
int id;
int users;
size_t size;
Expand Down Expand Up @@ -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);

Expand Down

0 comments on commit fc82975

Please sign in to comment.