Source
31
31
* found.
32
32
*/
33
33
static struct of_dma *of_dma_find_controller(struct of_phandle_args *dma_spec)
34
34
{
35
35
struct of_dma *ofdma;
36
36
37
37
list_for_each_entry(ofdma, &of_dma_list, of_dma_controllers)
38
38
if (ofdma->of_node == dma_spec->np)
39
39
return ofdma;
40
40
41
-
pr_debug("%s: can't find DMA controller %s\n", __func__,
42
-
dma_spec->np->full_name);
41
+
pr_debug("%s: can't find DMA controller %pOF\n", __func__,
42
+
dma_spec->np);
43
43
44
44
return NULL;
45
45
}
46
46
47
47
/**
48
48
* of_dma_router_xlate - translation function for router devices
49
49
* @dma_spec: pointer to DMA specifier as found in the device tree
50
50
* @of_dma: pointer to DMA controller data (router information)
51
51
*
52
52
* The function creates new dma_spec to be passed to the router driver's
248
248
pr_err("%s: not enough information provided\n", __func__);
249
249
return ERR_PTR(-ENODEV);
250
250
}
251
251
252
252
/* Silently fail if there is not even the "dmas" property */
253
253
if (!of_find_property(np, "dmas", NULL))
254
254
return ERR_PTR(-ENODEV);
255
255
256
256
count = of_property_count_strings(np, "dma-names");
257
257
if (count < 0) {
258
-
pr_err("%s: dma-names property of node '%s' missing or empty\n",
259
-
__func__, np->full_name);
258
+
pr_err("%s: dma-names property of node '%pOF' missing or empty\n",
259
+
__func__, np);
260
260
return ERR_PTR(-ENODEV);
261
261
}
262
262
263
263
/*
264
264
* approximate an average distribution across multiple
265
265
* entries with the same name
266
266
*/
267
267
start = atomic_inc_return(&last_index);
268
268
for (i = 0; i < count; i++) {
269
269
if (of_dma_match_channel(np, name,