aboutsummaryrefslogtreecommitdiffstats
path: root/sysfs.c
diff options
context:
space:
mode:
authorPA4WDH2023-05-27 10:47:05 +0200
committerPA4WDH2023-05-27 10:47:05 +0200
commitbd331dbb839d7ee8b2d8abeb89d4fd650db58a9d (patch)
tree617c55fff6034445caf56ff4c65779bda5b3d7f5 /sysfs.c
parentAdded restart delay in Gentoo initscript (diff)
downloadcputemp2maxfreq-bd331dbb839d7ee8b2d8abeb89d4fd650db58a9d.tar.gz
cputemp2maxfreq-bd331dbb839d7ee8b2d8abeb89d4fd650db58a9d.tar.bz2
cputemp2maxfreq-bd331dbb839d7ee8b2d8abeb89d4fd650db58a9d.zip
Use CPU Transition Latency as checkdelay when setting new scaling_max_freq
Diffstat (limited to 'sysfs.c')
-rw-r--r--sysfs.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/sysfs.c b/sysfs.c
index e31aef2..ff3bb67 100644
--- a/sysfs.c
+++ b/sysfs.c
@@ -47,7 +47,7 @@ long int sysfs_read_long_int(char *sysfs_file)
return strtoll((char*)&buf,NULL,10);
}
-int sysfs_write_str(char *sysfs_file,char *value,int checkdelay)
+int sysfs_write_str(char *sysfs_file,char *value,long int checkdelay)
{
int sysfs_handle;
size_t len;
@@ -66,7 +66,7 @@ int sysfs_write_str(char *sysfs_file,char *value,int checkdelay)
DEBUG2_SYSFS("Written %zd bytes\n",len);
// What if instructed to
- if (checkdelay>0) usleep(checkdelay*1000);
+ if (checkdelay>0) usleep(checkdelay);
// Validate we actually set what we want to set
sysfs_read_str(sysfs_file,buf,sizeof(buf));