linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH v1 1/1] PM / wakeup: use dev_set_name() directly
@ 2021-04-14 12:53 Andy Shevchenko
  2021-04-15 17:27 ` Rafael J. Wysocki
  0 siblings, 1 reply; 2+ messages in thread
From: Andy Shevchenko @ 2021-04-14 12:53 UTC (permalink / raw)
  To: Joe Perches, linux-pm, linux-kernel
  Cc: Rafael J. Wysocki, Pavel Machek, Len Brown, Greg Kroah-Hartman,
	Andy Shevchenko

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;
 
-- 
2.30.2


^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [PATCH v1 1/1] PM / wakeup: use dev_set_name() directly
  2021-04-14 12:53 [PATCH v1 1/1] PM / wakeup: use dev_set_name() directly Andy Shevchenko
@ 2021-04-15 17:27 ` Rafael J. Wysocki
  0 siblings, 0 replies; 2+ messages in thread
From: Rafael J. Wysocki @ 2021-04-15 17:27 UTC (permalink / raw)
  To: Andy Shevchenko
  Cc: Joe Perches, Linux PM, Linux Kernel Mailing List,
	Rafael J. Wysocki, Pavel Machek, Len Brown, Greg Kroah-Hartman

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!

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2021-04-15 17:27 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-04-14 12:53 [PATCH v1 1/1] PM / wakeup: use dev_set_name() directly Andy Shevchenko
2021-04-15 17:27 ` Rafael J. Wysocki

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).