Skip to content

Commit 716141d

Browse files
krzkvinodkoul
authored andcommitted
dmaengine: of: constify of_phandle_args in of_dma_find_controller()
of_dma_find_controller() does not modify passed of_phandle_args so the argument can be made pointer to const for code safety. Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org> Link: https://lore.kernel.org/r/20240208202742.631307-2-krzysztof.kozlowski@linaro.org Signed-off-by: Vinod Koul <vkoul@kernel.org>
1 parent 16374ab commit 716141d

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

drivers/dma/of-dma.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ static DEFINE_MUTEX(of_dma_lock);
2929
* to the DMA data stored is retuned. A NULL pointer is returned if no match is
3030
* found.
3131
*/
32-
static struct of_dma *of_dma_find_controller(struct of_phandle_args *dma_spec)
32+
static struct of_dma *of_dma_find_controller(const struct of_phandle_args *dma_spec)
3333
{
3434
struct of_dma *ofdma;
3535

0 commit comments

Comments
 (0)