]> git.kernelconcepts.de Git - karo-tx-linux.git/blobdiff - drivers/block/zram/zcomp.c
Merge tag 'kvm-4.13-2' of git://git.kernel.org/pub/scm/virt/kvm/kvm
[karo-tx-linux.git] / drivers / block / zram / zcomp.c
index 12046f4f00e4ce3fe19eb582168df37f4d2eb1f8..5b8992beffec865634897c078877cd15614db0aa 100644 (file)
@@ -68,13 +68,11 @@ static struct zcomp_strm *zcomp_strm_alloc(struct zcomp *comp)
 
 bool zcomp_available_algorithm(const char *comp)
 {
-       int i = 0;
+       int i;
 
-       while (backends[i]) {
-               if (sysfs_streq(comp, backends[i]))
-                       return true;
-               i++;
-       }
+       i = __sysfs_match_string(backends, -1, comp);
+       if (i >= 0)
+               return true;
 
        /*
         * Crypto does not ignore a trailing new line symbol,