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>
1 parent 631ecb7 commit e0ed32ee61676ef2e4090fe44220c63b8a66beaf
@Clement Leger Clement Leger authored on 25 Mar 2020
Sascha Hauer committed on 30 Mar 2020
Showing 1 changed file
View
drivers/of/base.c