nvmem: core: let stride and word_size default to 1
authorHeiner Kallweit <hkallweit1@gmail.com>
Fri, 15 Dec 2017 14:06:05 +0000 (14:06 +0000)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Tue, 19 Dec 2017 09:39:33 +0000 (10:39 +0100)
commit99897efd5aa0e9671946297ede45840bc2052c07
tree0211913b3b1195e9163eca35be5fa3415ee44377
parent9f3044c38c84989c37a6f29683a8899a2980341d
nvmem: core: let stride and word_size default to 1

If the caller doesn't set stride and/or word_size in struct nvmem_config
then nvmem_register accepts this but we may face strange effects later
due to both values being 0. Therefore use 1 as default for both values.

Signed-off-by: Heiner Kallweit <hkallweit1@gmail.com>
Signed-off-by: Srinivas Kandagatla <srinivas.kandagatla@linaro.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/nvmem/core.c