summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAndy Shevchenko <andriy.shevchenko@linux.intel.com>2012-12-17 16:01:21 -0800
committerLinus Torvalds <torvalds@linux-foundation.org>2012-12-17 17:15:17 -0800
commit35367ab28d024ef026dbd797b4076c8f008ec08c (patch)
tree0f4505be48bcf7de1136dde92365cbe9ab8bf55e
parentb18888ab256f05626193be955a7a03f01d676f8c (diff)
downloadlinux-35367ab28d024ef026dbd797b4076c8f008ec08c.tar.bz2
lib: dynamic_debug: use kbasename()
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> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
-rw-r--r--lib/dynamic_debug.c9
1 files changed, 1 insertions, 8 deletions
diff --git a/lib/dynamic_debug.c b/lib/dynamic_debug.c
index e7f7d993357a..1db1fc660538 100644
--- a/lib/dynamic_debug.c
+++ b/lib/dynamic_debug.c
@@ -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;