Commit 85044eb0 authored by Will Deacon's avatar Will Deacon Committed by Konrad Rzeszutek Wilk

of: Return success from of_dma_set_restricted_buffer() when !OF_ADDRESS

When CONFIG_OF_ADDRESS=n, of_dma_set_restricted_buffer() returns -ENODEV
and breaks the boot for sparc[64] machines. Return 0 instead, since the
function is essentially a glorified NOP in this configuration.

Cc: Claire Chang <tientzu@chromium.org>
Cc: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>
Reported-by: default avatarGuenter Roeck <linux@roeck-us.net>
Suggested-by: default avatarRobin Murphy <robin.murphy@arm.com>
Tested-by: default avatarGuenter Roeck <linux@roeck-us.net>
Tested-by: default avatarClaire Chang <tientzu@chromium.org>
Reviewed-by: default avatarChristoph Hellwig <hch@lst.de>
Link: https://lore.kernel.org/r/20210702030807.GA2685166@roeck-us.net
Fixes: fec9b625 ("of: Add plumbing for restricted DMA pool")
Signed-off-by: default avatarWill Deacon <will@kernel.org>
Signed-off-by: default avatarKonrad Rzeszutek Wilk <konrad@kernel.org>
parent 868c9ddc
...@@ -173,7 +173,8 @@ static inline int of_dma_get_range(struct device_node *np, ...@@ -173,7 +173,8 @@ static inline int of_dma_get_range(struct device_node *np,
static inline int of_dma_set_restricted_buffer(struct device *dev, static inline int of_dma_set_restricted_buffer(struct device *dev,
struct device_node *np) struct device_node *np)
{ {
return -ENODEV; /* Do nothing, successfully. */
return 0;
} }
#endif #endif
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment