diff mbox series

[v1,1/1] PM / wakeup: use dev_set_name() directly

Message ID 20210414125310.10900-1-andriy.shevchenko@linux.intel.com (mailing list archive)
State Mainlined, archived
Headers show
Series [v1,1/1] PM / wakeup: use dev_set_name() directly | expand

Commit Message

Andy Shevchenko April 14, 2021, 12:53 p.m. UTC
We have open coded dev_set_name() implementation, replace that
with a direct call.

Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
---
 drivers/base/power/wakeup_stats.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Comments

Rafael J. Wysocki April 15, 2021, 5:27 p.m. UTC | #1
On Wed, Apr 14, 2021 at 2:53 PM Andy Shevchenko
<andriy.shevchenko@linux.intel.com> wrote:
>
> We have open coded dev_set_name() implementation, replace that
> with a direct call.
>
> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
> ---
>  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!
diff mbox series

Patch

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;