Re: [PATCH v1 1/1] PM / wakeup: use dev_set_name() directly
From: Rafael J. Wysocki
Date: Thu Apr 15 2021 - 13:27:23 EST
On Wed, Apr 14, 2021 at 2:53 PM Andy Shevchenko
<andriy.shevchenko@xxxxxxxxxxxxxxx> wrote:
>
> We have open coded dev_set_name() implementation, replace that
> with a direct call.
>
> Signed-off-by: Andy Shevchenko <andriy.shevchenko@xxxxxxxxxxxxxxx>
> ---
> drivers/base/power/wakeup_stats.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/base/power/wakeup_stats.c b/drivers/base/power/wakeup_stats.c
> index d638259b829a..5ade7539ac02 100644
> --- a/drivers/base/power/wakeup_stats.c
> +++ b/drivers/base/power/wakeup_stats.c
> @@ -154,7 +154,7 @@ static struct device *wakeup_source_device_create(struct device *parent,
> dev_set_drvdata(dev, ws);
> device_set_pm_not_required(dev);
>
> - retval = kobject_set_name(&dev->kobj, "wakeup%d", ws->id);
> + retval = dev_set_name(dev, "wakeup%d", ws->id);
> if (retval)
> goto error;
>
> --
Applied as 5.13 material, thanks!