aboutsummaryrefslogtreecommitdiffstats
path: root/drivers
diff options
context:
space:
mode:
Diffstat (limited to 'drivers')
-rw-r--r--drivers/block/as-iosched.c10
1 files changed, 1 insertions, 9 deletions
diff --git a/drivers/block/as-iosched.c b/drivers/block/as-iosched.c
index 91aeb678135d..95c0a3690b0f 100644
--- a/drivers/block/as-iosched.c
+++ b/drivers/block/as-iosched.c
@@ -1935,23 +1935,15 @@ struct as_fs_entry {
1935static ssize_t 1935static ssize_t
1936as_var_show(unsigned int var, char *page) 1936as_var_show(unsigned int var, char *page)
1937{ 1937{
1938 var = (var * 1000) / HZ;
1939 return sprintf(page, "%d\n", var); 1938 return sprintf(page, "%d\n", var);
1940} 1939}
1941 1940
1942static ssize_t 1941static ssize_t
1943as_var_store(unsigned long *var, const char *page, size_t count) 1942as_var_store(unsigned long *var, const char *page, size_t count)
1944{ 1943{
1945 unsigned long tmp;
1946 char *p = (char *) page; 1944 char *p = (char *) page;
1947 1945
1948 tmp = simple_strtoul(p, &p, 10); 1946 *var = simple_strtoul(p, &p, 10);
1949 if (tmp != 0) {
1950 tmp = (tmp * HZ) / 1000;
1951 if (tmp == 0)
1952 tmp = 1;
1953 }
1954 *var = tmp;
1955 return count; 1947 return count;
1956} 1948}
1957 1949