Commit 68d9c47b authored by Rob Herring's avatar Rob Herring Committed by Mauro Carvalho Chehab

media: Convert to using %pOF instead of full_name

Now that we have a custom printf format specifier, convert users of
full_name to use %pOF instead. This is preparation to remove storing
of the full path string for each node.
Signed-off-by: default avatarRob Herring <robh@kernel.org>
Acked-by: default avatarNiklas Söderlund <niklas.soderlund+renesas@ragnatech.se>
Acked-by: default avatarLaurent Pinchart <laurent.pinchart@ideasonboard.com>
Reviewed-by: default avatarMatthias Brugger <matthias.bgg@gmail.com>
Acked-by: default avatarNicolas Ferre <nicolas.ferre@microchip.com>
Acked-by: default avatarLad, Prabhakar <prabhakar.csengg@gmail.com>
Cc: Kyungmin Park <kyungmin.park@samsung.com>
Cc: Andrzej Hajda <a.hajda@samsung.com>
Cc: Mauro Carvalho Chehab <mchehab@kernel.org>
Cc: Songjun Wu <songjun.wu@microchip.com>
Cc: Kukjin Kim <kgene@kernel.org>
Cc: Krzysztof Kozlowski <krzk@kernel.org>
Cc: Javier Martinez Canillas <javier@osg.samsung.com>
Cc: Minghsiu Tsai <minghsiu.tsai@mediatek.com>
Cc: Houlong Wei <houlong.wei@mediatek.com>
Cc: Andrew-CT Chen <andrew-ct.chen@mediatek.com>
Cc: Guennadi Liakhovetski <g.liakhovetski@gmx.de>
Cc: Hyun Kwon <hyun.kwon@xilinx.com>
Cc: Michal Simek <michal.simek@xilinx.com>
Cc: "Sören Brinkmann" <soren.brinkmann@xilinx.com>
Cc: linux-arm-kernel@lists.infradead.org
Cc: linux-samsung-soc@vger.kernel.org
Cc: linux-mediatek@lists.infradead.org
Cc: linux-renesas-soc@vger.kernel.org
Reviewed-by: default avatarSylwester Nawrocki <s.nawrocki@samsung.com>
Signed-off-by: default avatarHans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: default avatarMauro Carvalho Chehab <mchehab@s-opensource.com>
parent 02b1ce92
...@@ -1635,8 +1635,7 @@ static int s5c73m3_get_platform_data(struct s5c73m3 *state) ...@@ -1635,8 +1635,7 @@ static int s5c73m3_get_platform_data(struct s5c73m3 *state)
node_ep = of_graph_get_next_endpoint(node, NULL); node_ep = of_graph_get_next_endpoint(node, NULL);
if (!node_ep) { if (!node_ep) {
dev_warn(dev, "no endpoint defined for node: %s\n", dev_warn(dev, "no endpoint defined for node: %pOF\n", node);
node->full_name);
return 0; return 0;
} }
......
...@@ -1863,8 +1863,7 @@ static int s5k5baf_parse_device_node(struct s5k5baf *state, struct device *dev) ...@@ -1863,8 +1863,7 @@ static int s5k5baf_parse_device_node(struct s5k5baf *state, struct device *dev)
node_ep = of_graph_get_next_endpoint(node, NULL); node_ep = of_graph_get_next_endpoint(node, NULL);
if (!node_ep) { if (!node_ep) {
dev_err(dev, "no endpoint defined at node %s\n", dev_err(dev, "no endpoint defined at node %pOF\n", node);
node->full_name);
return -EINVAL; return -EINVAL;
} }
...@@ -1882,8 +1881,8 @@ static int s5k5baf_parse_device_node(struct s5k5baf *state, struct device *dev) ...@@ -1882,8 +1881,8 @@ static int s5k5baf_parse_device_node(struct s5k5baf *state, struct device *dev)
case V4L2_MBUS_PARALLEL: case V4L2_MBUS_PARALLEL:
break; break;
default: default:
dev_err(dev, "unsupported bus in endpoint defined at node %s\n", dev_err(dev, "unsupported bus in endpoint defined at node %pOF\n",
node->full_name); node);
return -EINVAL; return -EINVAL;
} }
......
...@@ -2490,8 +2490,8 @@ vpfe_get_pdata(struct platform_device *pdev) ...@@ -2490,8 +2490,8 @@ vpfe_get_pdata(struct platform_device *pdev)
rem = of_graph_get_remote_port_parent(endpoint); rem = of_graph_get_remote_port_parent(endpoint);
if (!rem) { if (!rem) {
dev_err(&pdev->dev, "Remote device at %s not found\n", dev_err(&pdev->dev, "Remote device at %pOF not found\n",
endpoint->full_name); endpoint);
goto done; goto done;
} }
......
...@@ -1700,8 +1700,8 @@ static int isc_parse_dt(struct device *dev, struct isc_device *isc) ...@@ -1700,8 +1700,8 @@ static int isc_parse_dt(struct device *dev, struct isc_device *isc)
rem = of_graph_get_remote_port_parent(epn); rem = of_graph_get_remote_port_parent(epn);
if (!rem) { if (!rem) {
dev_notice(dev, "Remote device at %s not found\n", dev_notice(dev, "Remote device at %pOF not found\n",
of_node_full_name(epn)); epn);
continue; continue;
} }
......
...@@ -1397,9 +1397,9 @@ static int vpif_async_bound(struct v4l2_async_notifier *notifier, ...@@ -1397,9 +1397,9 @@ static int vpif_async_bound(struct v4l2_async_notifier *notifier,
vpif_obj.config->chan_config->inputs[i].subdev_name = vpif_obj.config->chan_config->inputs[i].subdev_name =
(char *)to_of_node(subdev->fwnode)->full_name; (char *)to_of_node(subdev->fwnode)->full_name;
vpif_dbg(2, debug, vpif_dbg(2, debug,
"%s: setting input %d subdev_name = %s\n", "%s: setting input %d subdev_name = %pOF\n",
__func__, i, __func__, i,
to_of_node(subdev->fwnode)->full_name); to_of_node(subdev->fwnode));
return 0; return 0;
} }
} }
...@@ -1557,8 +1557,8 @@ vpif_capture_get_pdata(struct platform_device *pdev) ...@@ -1557,8 +1557,8 @@ vpif_capture_get_pdata(struct platform_device *pdev)
dev_err(&pdev->dev, "Could not parse the endpoint\n"); dev_err(&pdev->dev, "Could not parse the endpoint\n");
goto done; goto done;
} }
dev_dbg(&pdev->dev, "Endpoint %s, bus_width = %d\n", dev_dbg(&pdev->dev, "Endpoint %pOF, bus_width = %d\n",
endpoint->full_name, bus_cfg.bus.parallel.bus_width); endpoint, bus_cfg.bus.parallel.bus_width);
flags = bus_cfg.bus.parallel.flags; flags = bus_cfg.bus.parallel.flags;
if (flags & V4L2_MBUS_HSYNC_ACTIVE_HIGH) if (flags & V4L2_MBUS_HSYNC_ACTIVE_HIGH)
...@@ -1569,13 +1569,13 @@ vpif_capture_get_pdata(struct platform_device *pdev) ...@@ -1569,13 +1569,13 @@ vpif_capture_get_pdata(struct platform_device *pdev)
rem = of_graph_get_remote_port_parent(endpoint); rem = of_graph_get_remote_port_parent(endpoint);
if (!rem) { if (!rem) {
dev_dbg(&pdev->dev, "Remote device at %s not found\n", dev_dbg(&pdev->dev, "Remote device at %pOF not found\n",
endpoint->full_name); endpoint);
goto done; goto done;
} }
dev_dbg(&pdev->dev, "Remote device %s, %s found\n", dev_dbg(&pdev->dev, "Remote device %s, %pOF found\n",
rem->name, rem->full_name); rem->name, rem);
sdinfo->name = rem->full_name; sdinfo->name = rem->full_name;
pdata->asd[i] = devm_kzalloc(&pdev->dev, pdata->asd[i] = devm_kzalloc(&pdev->dev,
......
...@@ -174,8 +174,8 @@ static int fimc_is_parse_sensor_config(struct fimc_is *is, unsigned int index, ...@@ -174,8 +174,8 @@ static int fimc_is_parse_sensor_config(struct fimc_is *is, unsigned int index,
sensor->drvdata = fimc_is_sensor_get_drvdata(node); sensor->drvdata = fimc_is_sensor_get_drvdata(node);
if (!sensor->drvdata) { if (!sensor->drvdata) {
dev_err(&is->pdev->dev, "no driver data found for: %s\n", dev_err(&is->pdev->dev, "no driver data found for: %pOF\n",
node->full_name); node);
return -EINVAL; return -EINVAL;
} }
...@@ -191,8 +191,8 @@ static int fimc_is_parse_sensor_config(struct fimc_is *is, unsigned int index, ...@@ -191,8 +191,8 @@ static int fimc_is_parse_sensor_config(struct fimc_is *is, unsigned int index,
/* Use MIPI-CSIS channel id to determine the ISP I2C bus index. */ /* Use MIPI-CSIS channel id to determine the ISP I2C bus index. */
ret = of_property_read_u32(port, "reg", &tmp); ret = of_property_read_u32(port, "reg", &tmp);
if (ret < 0) { if (ret < 0) {
dev_err(&is->pdev->dev, "reg property not found at: %s\n", dev_err(&is->pdev->dev, "reg property not found at: %pOF\n",
port->full_name); port);
of_node_put(port); of_node_put(port);
return ret; return ret;
} }
......
...@@ -1493,8 +1493,7 @@ static int fimc_lite_probe(struct platform_device *pdev) ...@@ -1493,8 +1493,7 @@ static int fimc_lite_probe(struct platform_device *pdev)
if (!drv_data || fimc->index >= drv_data->num_instances || if (!drv_data || fimc->index >= drv_data->num_instances ||
fimc->index < 0) { fimc->index < 0) {
dev_err(dev, "Wrong %s node alias\n", dev_err(dev, "Wrong %pOF node alias\n", dev->of_node);
dev->of_node->full_name);
return -EINVAL; return -EINVAL;
} }
......
...@@ -412,8 +412,8 @@ static int fimc_md_parse_port_node(struct fimc_md *fmd, ...@@ -412,8 +412,8 @@ static int fimc_md_parse_port_node(struct fimc_md *fmd,
rem = of_graph_get_remote_port_parent(ep); rem = of_graph_get_remote_port_parent(ep);
of_node_put(ep); of_node_put(ep);
if (rem == NULL) { if (rem == NULL) {
v4l2_info(&fmd->v4l2_dev, "Remote device at %s not found\n", v4l2_info(&fmd->v4l2_dev, "Remote device at %pOF not found\n",
ep->full_name); ep);
return 0; return 0;
} }
...@@ -430,8 +430,8 @@ static int fimc_md_parse_port_node(struct fimc_md *fmd, ...@@ -430,8 +430,8 @@ static int fimc_md_parse_port_node(struct fimc_md *fmd,
*/ */
pd->sensor_bus_type = FIMC_BUS_TYPE_MIPI_CSI2; pd->sensor_bus_type = FIMC_BUS_TYPE_MIPI_CSI2;
} else { } else {
v4l2_err(&fmd->v4l2_dev, "Wrong port id (%u) at node %s\n", v4l2_err(&fmd->v4l2_dev, "Wrong port id (%u) at node %pOF\n",
endpoint.base.port, rem->full_name); endpoint.base.port, rem);
} }
/* /*
* For FIMC-IS handled sensors, that are placed under i2c-isp device * For FIMC-IS handled sensors, that are placed under i2c-isp device
......
...@@ -730,8 +730,8 @@ static int s5pcsis_parse_dt(struct platform_device *pdev, ...@@ -730,8 +730,8 @@ static int s5pcsis_parse_dt(struct platform_device *pdev,
node = of_graph_get_next_endpoint(node, NULL); node = of_graph_get_next_endpoint(node, NULL);
if (!node) { if (!node) {
dev_err(&pdev->dev, "No port node at %s\n", dev_err(&pdev->dev, "No port node at %pOF\n",
pdev->dev.of_node->full_name); pdev->dev.of_node);
return -EINVAL; return -EINVAL;
} }
/* Get port node and validate MIPI-CSI channel id. */ /* Get port node and validate MIPI-CSI channel id. */
......
...@@ -134,15 +134,13 @@ int mtk_mdp_comp_init(struct device *dev, struct device_node *node, ...@@ -134,15 +134,13 @@ int mtk_mdp_comp_init(struct device *dev, struct device_node *node,
larb_node = of_parse_phandle(node, "mediatek,larb", 0); larb_node = of_parse_phandle(node, "mediatek,larb", 0);
if (!larb_node) { if (!larb_node) {
dev_err(dev, dev_err(dev,
"Missing mediadek,larb phandle in %s node\n", "Missing mediadek,larb phandle in %pOF node\n", node);
node->full_name);
return -EINVAL; return -EINVAL;
} }
larb_pdev = of_find_device_by_node(larb_node); larb_pdev = of_find_device_by_node(larb_node);
if (!larb_pdev) { if (!larb_pdev) {
dev_warn(dev, "Waiting for larb device %s\n", dev_warn(dev, "Waiting for larb device %pOF\n", larb_node);
larb_node->full_name);
of_node_put(larb_node); of_node_put(larb_node);
return -EPROBE_DEFER; return -EPROBE_DEFER;
} }
......
...@@ -137,16 +137,16 @@ static int mtk_mdp_probe(struct platform_device *pdev) ...@@ -137,16 +137,16 @@ static int mtk_mdp_probe(struct platform_device *pdev)
continue; continue;
if (!of_device_is_available(node)) { if (!of_device_is_available(node)) {
dev_err(dev, "Skipping disabled component %s\n", dev_err(dev, "Skipping disabled component %pOF\n",
node->full_name); node);
continue; continue;
} }
comp_type = (enum mtk_mdp_comp_type)of_id->data; comp_type = (enum mtk_mdp_comp_type)of_id->data;
comp_id = mtk_mdp_comp_get_id(dev, node, comp_type); comp_id = mtk_mdp_comp_get_id(dev, node, comp_type);
if (comp_id < 0) { if (comp_id < 0) {
dev_warn(dev, "Skipping unknown component %s\n", dev_warn(dev, "Skipping unknown component %pOF\n",
node->full_name); node);
continue; continue;
} }
......
...@@ -2024,8 +2024,8 @@ static int isp_fwnode_parse(struct device *dev, struct fwnode_handle *fwnode, ...@@ -2024,8 +2024,8 @@ static int isp_fwnode_parse(struct device *dev, struct fwnode_handle *fwnode,
if (ret) if (ret)
return ret; return ret;
dev_dbg(dev, "parsing endpoint %s, interface %u\n", dev_dbg(dev, "parsing endpoint %pOF, interface %u\n",
to_of_node(fwnode)->full_name, vep.base.port); to_of_node(fwnode), vep.base.port);
switch (vep.base.port) { switch (vep.base.port) {
case ISP_OF_PHY_PARALLEL: case ISP_OF_PHY_PARALLEL:
...@@ -2136,8 +2136,8 @@ static int isp_fwnode_parse(struct device *dev, struct fwnode_handle *fwnode, ...@@ -2136,8 +2136,8 @@ static int isp_fwnode_parse(struct device *dev, struct fwnode_handle *fwnode,
break; break;
default: default:
dev_warn(dev, "%s: invalid interface %u\n", dev_warn(dev, "%pOF: invalid interface %u\n",
to_of_node(fwnode)->full_name, vep.base.port); to_of_node(fwnode), vep.base.port);
return -EINVAL; return -EINVAL;
} }
......
...@@ -2331,7 +2331,7 @@ static int pxa_camera_pdata_from_dt(struct device *dev, ...@@ -2331,7 +2331,7 @@ static int pxa_camera_pdata_from_dt(struct device *dev,
asd->match.fwnode.fwnode = of_fwnode_handle(remote); asd->match.fwnode.fwnode = of_fwnode_handle(remote);
of_node_put(remote); of_node_put(remote);
} else { } else {
dev_notice(dev, "no remote for %s\n", of_node_full_name(np)); dev_notice(dev, "no remote for %pOF\n", np);
} }
out: out:
......
...@@ -222,8 +222,8 @@ static int rvin_digital_graph_init(struct rvin_dev *vin) ...@@ -222,8 +222,8 @@ static int rvin_digital_graph_init(struct rvin_dev *vin)
subdevs[0] = &vin->digital.asd; subdevs[0] = &vin->digital.asd;
vin_dbg(vin, "Found digital subdevice %s\n", vin_dbg(vin, "Found digital subdevice %pOF\n",
of_node_full_name(to_of_node(subdevs[0]->match.fwnode.fwnode))); to_of_node(subdevs[0]->match.fwnode.fwnode));
vin->notifier.num_subdevs = 1; vin->notifier.num_subdevs = 1;
vin->notifier.subdevs = subdevs; vin->notifier.subdevs = subdevs;
......
...@@ -1550,8 +1550,7 @@ static int soc_of_bind(struct soc_camera_host *ici, ...@@ -1550,8 +1550,7 @@ static int soc_of_bind(struct soc_camera_host *ici,
v4l2_clk_name_i2c(clk_name, sizeof(clk_name), v4l2_clk_name_i2c(clk_name, sizeof(clk_name),
client->adapter->nr, client->addr); client->adapter->nr, client->addr);
else else
v4l2_clk_name_of(clk_name, sizeof(clk_name), v4l2_clk_name_of(clk_name, sizeof(clk_name), remote);
of_node_full_name(remote));
icd->clk = v4l2_clk_register(&soc_camera_clk_ops, clk_name, icd); icd->clk = v4l2_clk_register(&soc_camera_clk_ops, clk_name, icd);
if (IS_ERR(icd->clk)) { if (IS_ERR(icd->clk)) {
...@@ -1590,8 +1589,7 @@ static void scan_of_host(struct soc_camera_host *ici) ...@@ -1590,8 +1589,7 @@ static void scan_of_host(struct soc_camera_host *ici)
ren = of_graph_get_remote_port(epn); ren = of_graph_get_remote_port(epn);
if (!ren) { if (!ren) {
dev_notice(dev, "no remote for %s\n", dev_notice(dev, "no remote for %pOF\n", epn);
of_node_full_name(epn));
continue; continue;
} }
......
...@@ -90,12 +90,12 @@ static int xvip_graph_build_one(struct xvip_composite_device *xdev, ...@@ -90,12 +90,12 @@ static int xvip_graph_build_one(struct xvip_composite_device *xdev,
of_node_put(ep); of_node_put(ep);
ep = next; ep = next;
dev_dbg(xdev->dev, "processing endpoint %s\n", ep->full_name); dev_dbg(xdev->dev, "processing endpoint %pOF\n", ep);
ret = v4l2_fwnode_parse_link(of_fwnode_handle(ep), &link); ret = v4l2_fwnode_parse_link(of_fwnode_handle(ep), &link);
if (ret < 0) { if (ret < 0) {
dev_err(xdev->dev, "failed to parse link for %s\n", dev_err(xdev->dev, "failed to parse link for %pOF\n",
ep->full_name); ep);
continue; continue;
} }
...@@ -103,9 +103,9 @@ static int xvip_graph_build_one(struct xvip_composite_device *xdev, ...@@ -103,9 +103,9 @@ static int xvip_graph_build_one(struct xvip_composite_device *xdev,
* the link. * the link.
*/ */
if (link.local_port >= local->num_pads) { if (link.local_port >= local->num_pads) {
dev_err(xdev->dev, "invalid port number %u for %s\n", dev_err(xdev->dev, "invalid port number %u for %pOF\n",
link.local_port, link.local_port,
to_of_node(link.local_node)->full_name); to_of_node(link.local_node));
v4l2_fwnode_put_link(&link); v4l2_fwnode_put_link(&link);
ret = -EINVAL; ret = -EINVAL;
break; break;
...@@ -114,8 +114,8 @@ static int xvip_graph_build_one(struct xvip_composite_device *xdev, ...@@ -114,8 +114,8 @@ static int xvip_graph_build_one(struct xvip_composite_device *xdev,
local_pad = &local->pads[link.local_port]; local_pad = &local->pads[link.local_port];
if (local_pad->flags & MEDIA_PAD_FL_SINK) { if (local_pad->flags & MEDIA_PAD_FL_SINK) {
dev_dbg(xdev->dev, "skipping sink port %s:%u\n", dev_dbg(xdev->dev, "skipping sink port %pOF:%u\n",
to_of_node(link.local_node)->full_name, to_of_node(link.local_node),
link.local_port); link.local_port);
v4l2_fwnode_put_link(&link); v4l2_fwnode_put_link(&link);
continue; continue;
...@@ -123,8 +123,8 @@ static int xvip_graph_build_one(struct xvip_composite_device *xdev, ...@@ -123,8 +123,8 @@ static int xvip_graph_build_one(struct xvip_composite_device *xdev,
/* Skip DMA engines, they will be processed separately. */ /* Skip DMA engines, they will be processed separately. */
if (link.remote_node == of_fwnode_handle(xdev->dev->of_node)) { if (link.remote_node == of_fwnode_handle(xdev->dev->of_node)) {
dev_dbg(xdev->dev, "skipping DMA port %s:%u\n", dev_dbg(xdev->dev, "skipping DMA port %pOF:%u\n",
to_of_node(link.local_node)->full_name, to_of_node(link.local_node),
link.local_port); link.local_port);
v4l2_fwnode_put_link(&link); v4l2_fwnode_put_link(&link);
continue; continue;
...@@ -134,8 +134,8 @@ static int xvip_graph_build_one(struct xvip_composite_device *xdev, ...@@ -134,8 +134,8 @@ static int xvip_graph_build_one(struct xvip_composite_device *xdev,
ent = xvip_graph_find_entity(xdev, ent = xvip_graph_find_entity(xdev,
to_of_node(link.remote_node)); to_of_node(link.remote_node));
if (ent == NULL) { if (ent == NULL) {
dev_err(xdev->dev, "no entity found for %s\n", dev_err(xdev->dev, "no entity found for %pOF\n",
to_of_node(link.remote_node)->full_name); to_of_node(link.remote_node));
v4l2_fwnode_put_link(&link); v4l2_fwnode_put_link(&link);
ret = -ENODEV; ret = -ENODEV;
break; break;
...@@ -144,9 +144,8 @@ static int xvip_graph_build_one(struct xvip_composite_device *xdev, ...@@ -144,9 +144,8 @@ static int xvip_graph_build_one(struct xvip_composite_device *xdev,
remote = ent->entity; remote = ent->entity;
if (link.remote_port >= remote->num_pads) { if (link.remote_port >= remote->num_pads) {
dev_err(xdev->dev, "invalid port number %u on %s\n", dev_err(xdev->dev, "invalid port number %u on %pOF\n",
link.remote_port, link.remote_port, to_of_node(link.remote_node));
to_of_node(link.remote_node)->full_name);
v4l2_fwnode_put_link(&link); v4l2_fwnode_put_link(&link);
ret = -EINVAL; ret = -EINVAL;
break; break;
...@@ -216,12 +215,12 @@ static int xvip_graph_build_dma(struct xvip_composite_device *xdev) ...@@ -216,12 +215,12 @@ static int xvip_graph_build_dma(struct xvip_composite_device *xdev)
of_node_put(ep); of_node_put(ep);
ep = next; ep = next;
dev_dbg(xdev->dev, "processing endpoint %s\n", ep->full_name); dev_dbg(xdev->dev, "processing endpoint %pOF\n", ep);
ret = v4l2_fwnode_parse_link(of_fwnode_handle(ep), &link); ret = v4l2_fwnode_parse_link(of_fwnode_handle(ep), &link);
if (ret < 0) { if (ret < 0) {
dev_err(xdev->dev, "failed to parse link for %s\n", dev_err(xdev->dev, "failed to parse link for %pOF\n",
ep->full_name); ep);
continue; continue;
} }
...@@ -242,17 +241,17 @@ static int xvip_graph_build_dma(struct xvip_composite_device *xdev) ...@@ -242,17 +241,17 @@ static int xvip_graph_build_dma(struct xvip_composite_device *xdev)
ent = xvip_graph_find_entity(xdev, ent = xvip_graph_find_entity(xdev,
to_of_node(link.remote_node)); to_of_node(link.remote_node));
if (ent == NULL) { if (ent == NULL) {
dev_err(xdev->dev, "no entity found for %s\n", dev_err(xdev->dev, "no entity found for %pOF\n",
to_of_node(link.remote_node)->full_name); to_of_node(link.remote_node));
v4l2_fwnode_put_link(&link); v4l2_fwnode_put_link(&link);
ret = -ENODEV; ret = -ENODEV;
break; break;
} }
if (link.remote_port >= ent->entity->num_pads) { if (link.remote_port >= ent->entity->num_pads) {
dev_err(xdev->dev, "invalid port number %u on %s\n", dev_err(xdev->dev, "invalid port number %u on %pOF\n",
link.remote_port, link.remote_port,
to_of_node(link.remote_node)->full_name); to_of_node(link.remote_node));
v4l2_fwnode_put_link(&link); v4l2_fwnode_put_link(&link);
ret = -EINVAL; ret = -EINVAL;
break; break;
...@@ -337,8 +336,8 @@ static int xvip_graph_notify_bound(struct v4l2_async_notifier *notifier, ...@@ -337,8 +336,8 @@ static int xvip_graph_notify_bound(struct v4l2_async_notifier *notifier,
continue; continue;
if (entity->subdev) { if (entity->subdev) {
dev_err(xdev->dev, "duplicate subdev for node %s\n", dev_err(xdev->dev, "duplicate subdev for node %pOF\n",
entity->node->full_name); entity->node);
return -EINVAL; return -EINVAL;
} }
...@@ -360,14 +359,14 @@ static int xvip_graph_parse_one(struct xvip_composite_device *xdev, ...@@ -360,14 +359,14 @@ static int xvip_graph_parse_one(struct xvip_composite_device *xdev,
struct device_node *ep = NULL; struct device_node *ep = NULL;
int ret = 0; int ret = 0;
dev_dbg(xdev->dev, "parsing node %s\n", node->full_name); dev_dbg(xdev->dev, "parsing node %pOF\n", node);
while (1) { while (1) {
ep = of_graph_get_next_endpoint(node, ep); ep = of_graph_get_next_endpoint(node, ep);
if (ep == NULL) if (ep == NULL)
break; break;
dev_dbg(xdev->dev, "handling endpoint %s\n", ep->full_name); dev_dbg(xdev->dev, "handling endpoint %pOF\n", ep);
remote = of_graph_get_remote_port_parent(ep); remote = of_graph_get_remote_port_parent(ep);
if (remote == NULL) { if (remote == NULL) {
...@@ -452,8 +451,7 @@ static int xvip_graph_dma_init_one(struct xvip_composite_device *xdev, ...@@ -452,8 +451,7 @@ static int xvip_graph_dma_init_one(struct xvip_composite_device *xdev,
ret = xvip_dma_init(xdev, dma, type, index); ret = xvip_dma_init(xdev, dma, type, index);
if (ret < 0) { if (ret < 0) {
dev_err(xdev->dev, "%s initialization failed\n", dev_err(xdev->dev, "%pOF initialization failed\n", node);
node->full_name);
return ret; return ret;
} }
......
...@@ -61,8 +61,7 @@ struct v4l2_clk *v4l2_clk_get(struct device *dev, const char *id) ...@@ -61,8 +61,7 @@ struct v4l2_clk *v4l2_clk_get(struct device *dev, const char *id)
/* if dev_name is not found, try use the OF name to find again */ /* if dev_name is not found, try use the OF name to find again */
if (PTR_ERR(clk) == -ENODEV && dev->of_node) { if (PTR_ERR(clk) == -ENODEV && dev->of_node) {
v4l2_clk_name_of(clk_name, sizeof(clk_name), v4l2_clk_name_of(clk_name, sizeof(clk_name), dev->of_node);
of_node_full_name(dev->of_node));
clk = v4l2_clk_find(clk_name); clk = v4l2_clk_find(clk_name);
} }
......
...@@ -70,7 +70,7 @@ static inline struct v4l2_clk *v4l2_clk_register_fixed(const char *dev_id, ...@@ -70,7 +70,7 @@ static inline struct v4l2_clk *v4l2_clk_register_fixed(const char *dev_id,
#define v4l2_clk_name_i2c(name, size, adap, client) snprintf(name, size, \ #define v4l2_clk_name_i2c(name, size, adap, client) snprintf(name, size, \
"%d-%04x", adap, client) "%d-%04x", adap, client)
#define v4l2_clk_name_of(name, size, of_full_name) snprintf(name, size, \ #define v4l2_clk_name_of(name, size, node) snprintf(name, size, \
"of-%s", of_full_name) "of-%pOF", node)
#endif #endif
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment