mirror of
https://github.com/hardkernel/linux.git
synced 2026-06-10 12:57:06 +09:00
FROMLIST: 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: fec9b62509 ("of: Add plumbing for restricted DMA pool")
Signed-off-by: Will Deacon <will@kernel.org>
Link: https://lore.kernel.org/r/20210720133826.9075-2-will@kernel.org
Signed-off-by: Will Deacon <willdeacon@google.com>
Bug: 190591509
Change-Id: Id257a77ba98a6b6b4135cb98cabb2f3502061f38
This commit is contained in:
@@ -171,7 +171,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
|
||||
|
||||
|
||||
Reference in New Issue
Block a user