diff options
author | Rupesh Gujare <rupesh.gujare@atmel.com> | 2013-08-01 19:40:02 +0200 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2013-08-02 05:56:56 +0200 |
commit | 4d6c9e57027940b6b492abac4c1b67710e38f366 (patch) | |
tree | e1ac5274b0a573bcde53c23cc104c60a463538d4 | |
parent | staging: ozwpan: Mark string as const (diff) | |
download | linux-4d6c9e57027940b6b492abac4c1b67710e38f366.tar.xz linux-4d6c9e57027940b6b492abac4c1b67710e38f366.zip |
staging: ozwpan: Use kernel strncmp function.
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>
-rw-r--r-- | drivers/staging/ozwpan/ozproto.c | 17 |
1 files changed, 1 insertions, 16 deletions
diff --git a/drivers/staging/ozwpan/ozproto.c b/drivers/staging/ozwpan/ozproto.c index 2dbaba636e71..ec602863feca 100644 --- a/drivers/staging/ozwpan/ozproto.c +++ b/drivers/staging/ozwpan/ozproto.c @@ -669,21 +669,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 - */ static void pd_stop_all_for_device(struct net_device *net_dev) { struct list_head h; @@ -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; |