mirror of
https://github.com/Fishwaldo/Star64_linux.git
synced 2025-06-27 00:51:35 +00:00
drivers: of: add return value to of_reserved_mem_device_init()
Driver calling of_reserved_mem_device_init() might be interested if the initialization has been successful or not, so add support for returning error code. This fixes a build warining caused by commit7bfa5ab6fa
("drivers: dma-coherent: add initialization from device tree"), which has been merged without this change and without fixing function return value. Fixes:7bfa5ab6fa
("drivers: dma-coherent: add initialization from device tree") Signed-off-by: Marek Szyprowski <m.szyprowski@samsung.com> Acked-by: Arnd Bergmann <arnd@arndb.de> Cc: Michal Nazarewicz <mina86@mina86.com> Cc: Grant Likely <grant.likely@linaro.org> Cc: Laura Abbott <lauraa@codeaurora.org> Cc: Josh Cartwright <joshc@codeaurora.org> Cc: Joonsoo Kim <iamjoonsoo.kim@lge.com> Cc: Kyungmin Park <kyungmin.park@samsung.com> Cc: Russell King <rmk+kernel@arm.linux.org.uk> Cc: Stephen Rothwell <sfr@canb.auug.org.au> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
This commit is contained in:
parent
5ddacbe92b
commit
47f29df7db
3 changed files with 17 additions and 9 deletions
|
@ -16,7 +16,7 @@ struct reserved_mem {
|
|||
};
|
||||
|
||||
struct reserved_mem_ops {
|
||||
void (*device_init)(struct reserved_mem *rmem,
|
||||
int (*device_init)(struct reserved_mem *rmem,
|
||||
struct device *dev);
|
||||
void (*device_release)(struct reserved_mem *rmem,
|
||||
struct device *dev);
|
||||
|
@ -28,14 +28,17 @@ typedef int (*reservedmem_of_init_fn)(struct reserved_mem *rmem);
|
|||
_OF_DECLARE(reservedmem, name, compat, init, reservedmem_of_init_fn)
|
||||
|
||||
#ifdef CONFIG_OF_RESERVED_MEM
|
||||
void of_reserved_mem_device_init(struct device *dev);
|
||||
int of_reserved_mem_device_init(struct device *dev);
|
||||
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);
|
||||
#else
|
||||
static inline void of_reserved_mem_device_init(struct device *dev) { }
|
||||
static inline int of_reserved_mem_device_init(struct device *dev)
|
||||
{
|
||||
return -ENOSYS;
|
||||
}
|
||||
static inline void of_reserved_mem_device_release(struct device *pdev) { }
|
||||
|
||||
static inline void fdt_init_reserved_mem(void) { }
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue