hulk inclusion category: feature bugzilla: https://gitee.com/openeuler/kernel/issues/IBC4SJ
--------------------------------
The name of the event in devfreq-event only has the ID as a distinguishing mark, which is too simple and not intuitive enough to distinguish different events.
Therefore, the name parameter of desc is added to the name of the event.
Signed-off-by: Xiangwei Li liwei728@huawei.com --- drivers/devfreq/devfreq-event.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/drivers/devfreq/devfreq-event.c b/drivers/devfreq/devfreq-event.c index cd5b12ddc448..acc3cfa70daf 100644 --- a/drivers/devfreq/devfreq-event.c +++ b/drivers/devfreq/devfreq-event.c @@ -360,7 +360,8 @@ struct devfreq_event_dev *devfreq_event_add_edev(struct device *dev, edev->dev.class = devfreq_event_class; edev->dev.release = devfreq_event_release_edev;
- dev_set_name(&edev->dev, "event%d", atomic_inc_return(&event_no)); + dev_set_name(&edev->dev, "event-%s-%d", + desc->name, atomic_inc_return(&event_no)); ret = device_register(&edev->dev); if (ret < 0) { put_device(&edev->dev);