staging: ozwpan: Use kernel strncmp function.
authorRupesh Gujare <rupesh.gujare@atmel.com>
Thu, 1 Aug 2013 17:40:02 +0000 (18:40 +0100)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Fri, 2 Aug 2013 03:56:56 +0000 (11:56 +0800)
Use kernel's strncmp() function instead of defining same within driver.

Signed-off-by: Rupesh Gujare <rupesh.gujare@atmel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/staging/ozwpan/ozproto.c

index 2dbaba636e710fe0561b86508bdb83f229215b65..ec602863fecaced21f612564eb7313988f0bfcc3 100644 (file)
@@ -666,21 +666,6 @@ void oz_binding_add(const char *net_dev)
                }
        }
 }
-/*------------------------------------------------------------------------------
- * Context: process
- */
-static int compare_binding_name(const char *s1, const char *s2)
-{
-       int i;
-       for (i = 0; i < OZ_MAX_BINDING_LEN; i++) {
-               if (*s1 != *s2)
-                       return 0;
-               if (!*s1++)
-                       return 1;
-               s2++;
-       }
-       return 1;
-}
 /*------------------------------------------------------------------------------
  * Context: process
  */
@@ -715,7 +700,7 @@ void oz_binding_remove(const char *net_dev)
        oz_dbg(ON, "Removing binding: %s\n", net_dev);
        spin_lock_bh(&g_binding_lock);
        list_for_each_entry(binding, &g_binding, link) {
-               if (compare_binding_name(binding->name, net_dev)) {
+               if (strncmp(binding->name, net_dev, OZ_MAX_BINDING_LEN) == 0) {
                        oz_dbg(ON, "Binding '%s' found\n", net_dev);
                        found = 1;
                        break;