Commit 4d6c9e57 authored by Rupesh Gujare's avatar Rupesh Gujare Committed by Greg Kroah-Hartman

staging: ozwpan: Use kernel strncmp function.

Use kernel's strncmp() function instead of defining same within driver.
Signed-off-by: default avatarRupesh Gujare <rupesh.gujare@atmel.com>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent 83e4817f
......@@ -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;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment