diff options
Diffstat (limited to 'drivers/gpio/gpiolib-of.c')
-rw-r--r-- | drivers/gpio/gpiolib-of.c | 29 |
1 files changed, 14 insertions, 15 deletions
diff --git a/drivers/gpio/gpiolib-of.c b/drivers/gpio/gpiolib-of.c index 54ce8dc58ad0..8cde02ed5fd5 100644 --- a/drivers/gpio/gpiolib-of.c +++ b/drivers/gpio/gpiolib-of.c @@ -78,8 +78,8 @@ struct gpio_desc *of_get_named_gpiod_flags(struct device_node *np, ret = of_parse_phandle_with_args(np, propname, "#gpio-cells", index, &gpiospec); if (ret) { - pr_debug("%s: can't parse '%s' property of node '%s[%d]'\n", - __func__, propname, np->full_name, index); + pr_debug("%s: can't parse '%s' property of node '%pOF[%d]'\n", + __func__, propname, np, index); return ERR_PTR(ret); } @@ -93,8 +93,8 @@ struct gpio_desc *of_get_named_gpiod_flags(struct device_node *np, if (IS_ERR(desc)) goto out; - pr_debug("%s: parsed '%s' property of node '%s[%d]' - status (%d)\n", - __func__, propname, np->full_name, index, + pr_debug("%s: parsed '%s' property of node '%pOF[%d]' - status (%d)\n", + __func__, propname, np, index, PTR_ERR_OR_ZERO(desc)); out: @@ -337,7 +337,7 @@ int of_mm_gpiochip_add_data(struct device_node *np, int ret = -ENOMEM; struct gpio_chip *gc = &mm_gc->gc; - gc->label = kstrdup(np->full_name, GFP_KERNEL); + gc->label = kasprintf(GFP_KERNEL, "%pOF", np); if (!gc->label) goto err0; @@ -362,8 +362,7 @@ err2: err1: kfree(gc->label); err0: - pr_err("%s: GPIO chip registration failed with status %d\n", - np->full_name, ret); + pr_err("%pOF: GPIO chip registration failed with status %d\n", np, ret); return ret; } EXPORT_SYMBOL(of_mm_gpiochip_add_data); @@ -418,8 +417,8 @@ static int of_gpiochip_add_pin_range(struct gpio_chip *chip) group_names_propname, index, &name); if (strlen(name)) { - pr_err("%s: Group name of numeric GPIO ranges must be the empty string.\n", - np->full_name); + pr_err("%pOF: Group name of numeric GPIO ranges must be the empty string.\n", + np); break; } } @@ -434,14 +433,14 @@ static int of_gpiochip_add_pin_range(struct gpio_chip *chip) } else { /* npins == 0: special range */ if (pinspec.args[1]) { - pr_err("%s: Illegal gpio-range format.\n", - np->full_name); + pr_err("%pOF: Illegal gpio-range format.\n", + np); break; } if (!group_names) { - pr_err("%s: GPIO group range requested but no %s property.\n", - np->full_name, group_names_propname); + pr_err("%pOF: GPIO group range requested but no %s property.\n", + np, group_names_propname); break; } @@ -452,8 +451,8 @@ static int of_gpiochip_add_pin_range(struct gpio_chip *chip) break; if (!strlen(name)) { - pr_err("%s: Group name of GPIO group range cannot be the empty string.\n", - np->full_name); + pr_err("%pOF: Group name of GPIO group range cannot be the empty string.\n", + np); break; } |