forked from ~ljy/RK356X_SDK_RELEASE

hc
2024-10-09 244b2c5ca8b14627e4a17755e5922221e121c771
kernel/drivers/base/power/wakeup_stats.c
....@@ -26,7 +26,7 @@
2626 { \
2727 struct wakeup_source *ws = dev_get_drvdata(dev); \
2828 \
29
- return sprintf(buf, "%lu\n", ws->_name); \
29
+ return sysfs_emit(buf, "%lu\n", ws->_name); \
3030 } \
3131 static DEVICE_ATTR_RO(_name)
3232
....@@ -57,6 +57,7 @@
5757 active_time = ktime_sub(ktime_get(), ws->last_time);
5858 total_time = ktime_add(total_time, active_time);
5959 }
60
+
6061 return sysfs_emit(buf, "%lld\n", ktime_to_ms(total_time));
6162 }
6263 static DEVICE_ATTR_RO(total_time_ms);
....@@ -73,6 +74,7 @@
7374 if (active_time > max_time)
7475 max_time = active_time;
7576 }
77
+
7678 return sysfs_emit(buf, "%lld\n", ktime_to_ms(max_time));
7779 }
7880 static DEVICE_ATTR_RO(max_time_ms);
....@@ -106,6 +108,7 @@
106108 prevent_sleep_time = ktime_add(prevent_sleep_time,
107109 ktime_sub(ktime_get(), ws->start_prevent_time));
108110 }
111
+
109112 return sysfs_emit(buf, "%lld\n", ktime_to_ms(prevent_sleep_time));
110113 }
111114 static DEVICE_ATTR_RO(prevent_suspend_time_ms);