From: Rob Herring Date: Thu, 27 May 2021 19:38:41 +0000 (-0500) Subject: of: Move reserved memory private function declarations X-Git-Url: http://git.maquefel.me/?a=commitdiff_plain;h=12d55d3b5370448f6568d0031b5e401cc050c29e;p=linux.git of: Move reserved memory private function declarations fdt_init_reserved_mem() and fdt_reserved_mem_save_node() are private to the DT code, so move there declarations to of_private.h. There's no need for the dummy functions as CONFIG_OF_RESERVED_MEM is always enabled for CONFIG_OF_EARLY_FLATTREE. Cc: Frank Rowand Signed-off-by: Rob Herring Link: https://lore.kernel.org/r/20210527193841.1284169-1-robh@kernel.org --- diff --git a/drivers/of/of_private.h b/drivers/of/of_private.h index d717efbd637da..631489f7f8c02 100644 --- a/drivers/of/of_private.h +++ b/drivers/of/of_private.h @@ -171,4 +171,8 @@ static inline int of_dma_get_range(struct device_node *np, } #endif +void fdt_init_reserved_mem(void); +void fdt_reserved_mem_save_node(unsigned long node, const char *uname, + phys_addr_t base, phys_addr_t size); + #endif /* _LINUX_OF_PRIVATE_H */ diff --git a/drivers/of/of_reserved_mem.c b/drivers/of/of_reserved_mem.c index 15e2417974d67..4592b71aba5cf 100644 --- a/drivers/of/of_reserved_mem.c +++ b/drivers/of/of_reserved_mem.c @@ -22,6 +22,8 @@ #include #include +#include "of_private.h" + #define MAX_RESERVED_REGIONS 64 static struct reserved_mem reserved_mem[MAX_RESERVED_REGIONS]; static int reserved_mem_count; diff --git a/include/linux/of_reserved_mem.h b/include/linux/of_reserved_mem.h index 8216a41562637..76e4a0fffba48 100644 --- a/include/linux/of_reserved_mem.h +++ b/include/linux/of_reserved_mem.h @@ -39,9 +39,6 @@ int of_reserved_mem_device_init_by_name(struct device *dev, const char *name); void of_reserved_mem_device_release(struct device *dev); -void fdt_init_reserved_mem(void); -void fdt_reserved_mem_save_node(unsigned long node, const char *uname, - phys_addr_t base, phys_addr_t size); struct reserved_mem *of_reserved_mem_lookup(struct device_node *np); #else static inline int of_reserved_mem_device_init_by_idx(struct device *dev, @@ -59,9 +56,6 @@ static inline int of_reserved_mem_device_init_by_name(struct device *dev, static inline void of_reserved_mem_device_release(struct device *pdev) { } -static inline void fdt_init_reserved_mem(void) { } -static inline void fdt_reserved_mem_save_node(unsigned long node, - const char *uname, phys_addr_t base, phys_addr_t size) { } static inline struct reserved_mem *of_reserved_mem_lookup(struct device_node *np) { return NULL;