nvmem: core: remove unused nvmem_device ncells member
authorSrinivas Kandagatla <srinivas.kandagatla@linaro.org>
Tue, 26 Jun 2018 11:36:40 +0000 (12:36 +0100)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Sat, 7 Jul 2018 15:30:46 +0000 (17:30 +0200)
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>
drivers/nvmem/core.c

index b5b0cdc21d01b4cd940e4fddb6f06976258e782d..34b71b1c69f4386776f23722939e13c3806a8f5e 100644 (file)
@@ -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);