]> git.hungrycats.org Git - linux/commitdiff
[PATCH] cpufreq: sysfs interface update
authorPatrick Mochel <mochel@osdl.org>
Mon, 13 Jan 2003 06:02:57 +0000 (22:02 -0800)
committerLinus Torvalds <torvalds@penguin.transmeta.com>
Mon, 13 Jan 2003 06:02:57 +0000 (22:02 -0800)
This updates new cpufreq sysfs code to new rules.

kernel/cpufreq.c

index f2981df44f65eeecff3b6f7fd1ae394b618c0b2e..f2e15a43e39d35111ba107c8e57f7b1e82caf1dd 100644 (file)
@@ -152,7 +152,7 @@ static ssize_t show_##file_name                                     \
  */
 #define cpufreq_per_cpu_attr_write(file_name, object)                  \
 static ssize_t store_##file_name                                       \
-(struct device *dev, const char *buf)                                  \
+(struct device *dev, const char *buf, size_t count)                    \
 {                                                                      \
        unsigned int ret = -EINVAL;                                     \
        struct cpufreq_policy policy;                                   \
@@ -172,7 +172,7 @@ static ssize_t store_##file_name                                    \
        if (ret)                                                        \
                return ret;                                             \
                                                                        \
-       return strlen(buf);                                             \
+       return count;                                                   \
 }
 
 
@@ -205,7 +205,8 @@ static ssize_t show_scaling_governor (struct device *dev, char *buf)
 /**
  * store_scaling_governor - store policy for the specified CPU
  */
-static ssize_t store_scaling_governor (struct device *dev, const char *buf) 
+static ssize_t 
+store_scaling_governor (struct device *dev, const char *buf, size_t count) 
 {
        unsigned int ret = -EINVAL;
        char    str_governor[16];
@@ -229,7 +230,7 @@ static ssize_t store_scaling_governor (struct device *dev, const char *buf)
        if (ret)
                return ret;
 
-       return strlen(buf);
+       return count;
 }