Commit f93861c2 authored by Rob Herring's avatar Rob Herring Committed by Greg Kroah-Hartman

staging: Convert to using %pOFn instead of device_node.name

In preparation to remove the node name pointer from struct device_node,
convert printf users to use the %pOFn format specifier.

Cc: Steve Longerbeam <slongerbeam@gmail.com>
Cc: Philipp Zabel <p.zabel@pengutronix.de>
Cc: Mauro Carvalho Chehab <mchehab@kernel.org>
Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Cc: linux-media@vger.kernel.org
Cc: devel@driverdev.osuosl.org
Signed-off-by: default avatarRob Herring <robh@kernel.org>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent 9989d7f5
...@@ -89,8 +89,12 @@ int imx_media_add_async_subdev(struct imx_media_dev *imxmd, ...@@ -89,8 +89,12 @@ int imx_media_add_async_subdev(struct imx_media_dev *imxmd,
/* return -EEXIST if this asd already added */ /* return -EEXIST if this asd already added */
if (find_async_subdev(imxmd, fwnode, devname)) { if (find_async_subdev(imxmd, fwnode, devname)) {
dev_dbg(imxmd->md.dev, "%s: already added %s\n", if (np)
__func__, np ? np->name : devname); dev_dbg(imxmd->md.dev, "%s: already added %pOFn\n",
__func__, np);
else
dev_dbg(imxmd->md.dev, "%s: already added %s\n",
__func__, devname);
ret = -EEXIST; ret = -EEXIST;
goto out; goto out;
} }
...@@ -105,19 +109,20 @@ int imx_media_add_async_subdev(struct imx_media_dev *imxmd, ...@@ -105,19 +109,20 @@ int imx_media_add_async_subdev(struct imx_media_dev *imxmd,
if (fwnode) { if (fwnode) {
asd->match_type = V4L2_ASYNC_MATCH_FWNODE; asd->match_type = V4L2_ASYNC_MATCH_FWNODE;
asd->match.fwnode = fwnode; asd->match.fwnode = fwnode;
dev_dbg(imxmd->md.dev, "%s: added %pOFn, match type FWNODE\n",
__func__, np);
} else { } else {
asd->match_type = V4L2_ASYNC_MATCH_DEVNAME; asd->match_type = V4L2_ASYNC_MATCH_DEVNAME;
asd->match.device_name = devname; asd->match.device_name = devname;
imxasd->pdev = pdev; imxasd->pdev = pdev;
dev_dbg(imxmd->md.dev, "%s: added %s, match type DEVNAME\n",
__func__, devname);
} }
list_add_tail(&imxasd->list, &imxmd->asd_list); list_add_tail(&imxasd->list, &imxmd->asd_list);
imxmd->subdev_notifier.num_subdevs++; imxmd->subdev_notifier.num_subdevs++;
dev_dbg(imxmd->md.dev, "%s: added %s, match type %s\n",
__func__, np ? np->name : devname, np ? "FWNODE" : "DEVNAME");
out: out:
mutex_unlock(&imxmd->mutex); mutex_unlock(&imxmd->mutex);
return ret; return ret;
......
...@@ -79,8 +79,8 @@ of_parse_subdev(struct imx_media_dev *imxmd, struct device_node *sd_np, ...@@ -79,8 +79,8 @@ of_parse_subdev(struct imx_media_dev *imxmd, struct device_node *sd_np,
int i, num_ports, ret; int i, num_ports, ret;
if (!of_device_is_available(sd_np)) { if (!of_device_is_available(sd_np)) {
dev_dbg(imxmd->md.dev, "%s: %s not enabled\n", __func__, dev_dbg(imxmd->md.dev, "%s: %pOFn not enabled\n", __func__,
sd_np->name); sd_np);
/* unavailable is not an error */ /* unavailable is not an error */
return 0; return 0;
} }
......
...@@ -70,7 +70,7 @@ int mtk_connect_phy_node(struct mtk_eth *eth, struct mtk_mac *mac, ...@@ -70,7 +70,7 @@ int mtk_connect_phy_node(struct mtk_eth *eth, struct mtk_mac *mac,
_port = of_get_property(phy_node, "reg", NULL); _port = of_get_property(phy_node, "reg", NULL);
if (!_port || (be32_to_cpu(*_port) >= 0x20)) { if (!_port || (be32_to_cpu(*_port) >= 0x20)) {
pr_err("%s: invalid port id\n", phy_node->name); pr_err("%pOFn: invalid port id\n", phy_node);
return -EINVAL; return -EINVAL;
} }
port = be32_to_cpu(*_port); port = be32_to_cpu(*_port);
...@@ -249,7 +249,7 @@ int mtk_mdio_init(struct mtk_eth *eth) ...@@ -249,7 +249,7 @@ int mtk_mdio_init(struct mtk_eth *eth)
eth->mii_bus->priv = eth; eth->mii_bus->priv = eth;
eth->mii_bus->parent = eth->dev; eth->mii_bus->parent = eth->dev;
snprintf(eth->mii_bus->id, MII_BUS_ID_SIZE, "%s", mii_np->name); snprintf(eth->mii_bus->id, MII_BUS_ID_SIZE, "%pOFn", mii_np);
err = of_mdiobus_register(eth->mii_bus, mii_np); err = of_mdiobus_register(eth->mii_bus, mii_np);
if (err) if (err)
goto err_free_bus; goto err_free_bus;
......
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