Skip to content

Commit 8c2467d

Browse files
krzkLinus Walleij
authored andcommitted
pinctrl: Simplify printks with pOF format
Print full device node name with %pOF format, so the code will be a bit simpler. Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org> Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
1 parent 334ef45 commit 8c2467d

2 files changed

Lines changed: 6 additions & 10 deletions

File tree

drivers/pinctrl/sprd/pinctrl-sprd.c

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -258,8 +258,7 @@ static int sprd_dt_node_to_map(struct pinctrl_dev *pctldev,
258258

259259
grp = sprd_pinctrl_find_group_by_name(pctl, np->name);
260260
if (!grp) {
261-
dev_err(pctl->dev, "unable to find group for node %s\n",
262-
of_node_full_name(np));
261+
dev_err(pctl->dev, "unable to find group for node %pOF\n", np);
263262
return -EINVAL;
264263
}
265264

@@ -276,16 +275,14 @@ static int sprd_dt_node_to_map(struct pinctrl_dev *pctldev,
276275
if (ret < 0) {
277276
if (ret != -EINVAL)
278277
dev_err(pctl->dev,
279-
"%s: could not parse property function\n",
280-
of_node_full_name(np));
278+
"%pOF: could not parse property function\n", np);
281279
function = NULL;
282280
}
283281

284282
ret = pinconf_generic_parse_dt_config(np, pctldev, &configs,
285283
&num_configs);
286284
if (ret < 0) {
287-
dev_err(pctl->dev, "%s: could not parse node property\n",
288-
of_node_full_name(np));
285+
dev_err(pctl->dev, "%pOF: could not parse node property\n", np);
289286
return ret;
290287
}
291288

drivers/pinctrl/sunxi/pinctrl-sunxi-dt.c

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -274,17 +274,16 @@ static void fill_pin_function(struct device *dev, struct device_node *node,
274274
if (!strcmp(pins[pin].pin.name, name))
275275
break;
276276
if (pin == npins) {
277-
dev_warn(dev, "%s: cannot find pin %s\n",
278-
of_node_full_name(node), name);
277+
dev_warn(dev, "%pOF: cannot find pin %s\n", node, name);
279278
index++;
280279
continue;
281280
}
282281

283282
/* Read the associated mux value. */
284283
muxval = sunxi_pinctrl_dt_read_pinmux(node, index);
285284
if (muxval == INVALID_MUX) {
286-
dev_warn(dev, "%s: invalid mux value for pin %s\n",
287-
of_node_full_name(node), name);
285+
dev_warn(dev, "%pOF: invalid mux value for pin %s\n",
286+
node, name);
288287
index++;
289288
continue;
290289
}

0 commit comments

Comments
 (0)