of: base: allow of_add_memory to be called multiple times
Currently, of_add_memory can't be called multiple times because it will always create memory banks by restarting at value 0. This means that, when adding a second memory bank by calling again of_add_memory, it will be named ram0 and overwrite the previous one. Fix that by using a static variable to store the current memory bank number in order to be preserved from one call to another. Signed-off-by: Clement Leger <cleger@kalray.eu> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de> |
---|
|
drivers/of/base.c |
---|