]> git.karo-electronics.de Git - karo-tx-linux.git/blobdiff - drivers/md/dm-queue-length.c
x86/mm/pat: Add set_memory_wt() for Write-Through type
[karo-tx-linux.git] / drivers / md / dm-queue-length.c
index f92b6cea9d9c8791997dc5e5c5d6003df578158e..3941fae0de9fd79f875f5ea32ce14b03cb76d8aa 100644 (file)
@@ -20,7 +20,7 @@
 #include <linux/ctype.h>
 #include <linux/errno.h>
 #include <linux/module.h>
-#include <asm/atomic.h>
+#include <linux/atomic.h>
 
 #define DM_MSG_PREFIX  "multipath queue-length"
 #define QL_MIN_IO      128
@@ -112,6 +112,7 @@ static int ql_add_path(struct path_selector *ps, struct dm_path *path,
        struct selector *s = ps->context;
        struct path_info *pi;
        unsigned repeat_count = QL_MIN_IO;
+       char dummy;
 
        /*
         * Arguments: [<repeat_count>]
@@ -123,7 +124,7 @@ static int ql_add_path(struct path_selector *ps, struct dm_path *path,
                return -EINVAL;
        }
 
-       if ((argc == 1) && (sscanf(argv[0], "%u", &repeat_count) != 1)) {
+       if ((argc == 1) && (sscanf(argv[0], "%u%c", &repeat_count, &dummy) != 1)) {
                *error = "queue-length ps: invalid repeat count";
                return -EINVAL;
        }