PM / wakeup: use dev_set_name() directly
authorAndy Shevchenko <andriy.shevchenko@linux.intel.com>
Wed, 14 Apr 2021 12:53:10 +0000 (15:53 +0300)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 15 Apr 2021 08:48:01 +0000 (10:48 +0200)
We have open coded dev_set_name() implementation, replace that
with a direct call.

Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Link: https://lore.kernel.org/r/20210414125310.10900-1-andriy.shevchenko@linux.intel.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/base/power/wakeup_stats.c

index d638259b829a5ef24303f874cbe2405722fbeae6..5ade7539ac0244beb20e5e71e10439ed0c5118ef 100644 (file)
@@ -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;