Skip to content

Commit 85044eb

Browse files
willdeaconkonradwilk
authored andcommitted
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: fec9b62 ("of: Add plumbing for restricted DMA pool") Signed-off-by: Will Deacon <will@kernel.org> Signed-off-by: Konrad Rzeszutek Wilk <konrad@kernel.org>
1 parent 868c9dd commit 85044eb

1 file changed

Lines changed: 2 additions & 1 deletion

File tree

drivers/of/of_private.h

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -173,7 +173,8 @@ static inline int of_dma_get_range(struct device_node *np,
173173
static inline int of_dma_set_restricted_buffer(struct device *dev,
174174
struct device_node *np)
175175
{
176-
return -ENODEV;
176+
/* Do nothing, successfully. */
177+
return 0;
177178
}
178179
#endif
179180

0 commit comments

Comments
 (0)