mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/herbert/cryptodev-2.6.git
synced 2026-04-25 00:52:45 -04:00
drivers: nvmem: Export nvmem_add_cells()
Not all platforms use device tree. It is useful to be able to add cells to a NVMEM device from code. Export nvmem_add_cells() so making this possible. This required changing the parameters a bit, so that just the cells and the number of cells are passed, not the whole nvmem config structure. Signed-off-by: Andrew Lunn <andrew@lunn.ch> Reviewed-by: Andrey Smirnov <andrew.smirnov@gmail.com> Signed-off-by: Srinivas Kandagatla <srinivas.kandagatla@linaro.org> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
This commit is contained in:
committed by
Greg Kroah-Hartman
parent
40fe78a242
commit
b3db17e4b8
@@ -77,6 +77,9 @@ struct nvmem_device *devm_nvmem_register(struct device *dev,
|
||||
|
||||
int devm_nvmem_unregister(struct device *dev, struct nvmem_device *nvmem);
|
||||
|
||||
int nvmem_add_cells(struct nvmem_device *nvmem,
|
||||
const struct nvmem_cell_info *info,
|
||||
int ncells);
|
||||
#else
|
||||
|
||||
static inline struct nvmem_device *nvmem_register(const struct nvmem_config *c)
|
||||
@@ -99,6 +102,14 @@ static inline int
|
||||
devm_nvmem_unregister(struct device *dev, struct nvmem_device *nvmem)
|
||||
{
|
||||
return nvmem_unregister(nvmem);
|
||||
|
||||
}
|
||||
|
||||
static inline int nvmem_add_cells(struct nvmem_device *nvmem,
|
||||
const struct nvmem_cell_info *info,
|
||||
int ncells)
|
||||
{
|
||||
return -ENOSYS;
|
||||
}
|
||||
|
||||
#endif /* CONFIG_NVMEM */
|
||||
|
||||
Reference in New Issue
Block a user