Commit 75291516 authored by Xiangwei Li's avatar Xiangwei Li Committed by Ma Wupeng
Browse files

PM / devfreq: event: Supplement the name content of the event in devfreq-event

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: default avatarXiangwei Li <liwei728@huawei.com>
parent 2539f319
Loading
Loading
Loading
Loading
+2 −1
Original line number Diff line number Diff line
@@ -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);