summaryrefslogtreecommitdiff
path: root/drivers/of
diff options
context:
space:
mode:
authorWill Deacon <will@kernel.org>2021-07-20 16:38:23 +0300
committerKonrad Rzeszutek Wilk <konrad@kernel.org>2021-07-24 03:13:07 +0300
commit85044eb08d0a37b1b6bcb3504bfd660a85ba5b7b (patch)
tree41e7369b712f770f5bf9d97dd47ccc205198bcc4 /drivers/of
parent868c9ddc182bc6728bb380cbfb3170734f72c599 (diff)
downloadlinux-85044eb08d0a37b1b6bcb3504bfd660a85ba5b7b.tar.xz
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: Guenter Roeck <linux@roeck-us.net> Suggested-by: Robin Murphy <robin.murphy@arm.com> Tested-by: Guenter Roeck <linux@roeck-us.net> Tested-by: Claire Chang <tientzu@chromium.org> Reviewed-by: Christoph Hellwig <hch@lst.de> Link: https://lore.kernel.org/r/20210702030807.GA2685166@roeck-us.net Fixes: fec9b625095f ("of: Add plumbing for restricted DMA pool") Signed-off-by: Will Deacon <will@kernel.org> Signed-off-by: Konrad Rzeszutek Wilk <konrad@kernel.org>
Diffstat (limited to 'drivers/of')
-rw-r--r--drivers/of/of_private.h3
1 files changed, 2 insertions, 1 deletions
diff --git a/drivers/of/of_private.h b/drivers/of/of_private.h
index 376462798f7e..f557bd22b0cf 100644
--- a/drivers/of/of_private.h
+++ b/drivers/of/of_private.h
@@ -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,
struct device_node *np)
{
- return -ENODEV;
+ /* Do nothing, successfully. */
+ return 0;
}
#endif