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 <[email protected]> Cc: Konrad Rzeszutek Wilk <[email protected]> Reported-by: Guenter Roeck <[email protected]> Suggested-by: Robin Murphy <[email protected]> Tested-by: Guenter Roeck <[email protected]> Tested-by: Claire Chang <[email protected]> Reviewed-by: Christoph Hellwig <[email protected]> Link: https://lore.kernel.org/r/[email protected] Fixes: fec9b62 ("of: Add plumbing for restricted DMA pool") Signed-off-by: Will Deacon <[email protected]> Signed-off-by: Konrad Rzeszutek Wilk <[email protected]>
1 parent 868c9dd commit 85044eb

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

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)