]> git.karo-electronics.de Git - karo-tx-linux.git/commitdiff
lib: dynamic_debug: use kbasename()
authorAndy Shevchenko <andriy.shevchenko@linux.intel.com>
Thu, 25 Oct 2012 01:15:05 +0000 (12:15 +1100)
committerStephen Rothwell <sfr@canb.auug.org.au>
Thu, 25 Oct 2012 03:14:46 +0000 (14:14 +1100)
Remove the custom implementation of the functionality similar to kbasename().

Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Cc: Jason Baron <jbaron@redhat.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
lib/dynamic_debug.c

index e7f7d993357a57985169ecbfc36ca793798c1a60..1db1fc66053875babfb933f93399899e48d8c730 100644 (file)
@@ -62,13 +62,6 @@ static LIST_HEAD(ddebug_tables);
 static int verbose = 0;
 module_param(verbose, int, 0644);
 
-/* Return the last part of a pathname */
-static inline const char *basename(const char *path)
-{
-       const char *tail = strrchr(path, '/');
-       return tail ? tail+1 : path;
-}
-
 /* Return the path relative to source root */
 static inline const char *trim_prefix(const char *path)
 {
@@ -154,7 +147,7 @@ static int ddebug_change(const struct ddebug_query *query,
                        /* match against the source filename */
                        if (query->filename &&
                            strcmp(query->filename, dp->filename) &&
-                           strcmp(query->filename, basename(dp->filename)) &&
+                           strcmp(query->filename, kbasename(dp->filename)) &&
                            strcmp(query->filename, trim_prefix(dp->filename)))
                                continue;