summaryrefslogtreecommitdiff
path: root/arch/arm/mach-ux500
diff options
context:
space:
mode:
authorAl Viro <viro@zeniv.linux.org.uk>2011-07-16 20:41:29 +0400
committerAl Viro <viro@zeniv.linux.org.uk>2011-07-21 04:47:52 +0400
commitc066b65abfe20b7a23ad3b1161cd67315f65f3c1 (patch)
tree79df0fee06603e497dafe1bc950c5c5e03c881da /arch/arm/mach-ux500
parent12520c438f48113593130d210eba821a532c893b (diff)
downloadlinux-c066b65abfe20b7a23ad3b1161cd67315f65f3c1.tar.xz
arm: don't create useless copies to pass into debugfs_create_dir()
its first argument is const char * and it's really not modified... Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Diffstat (limited to 'arch/arm/mach-ux500')
-rw-r--r--arch/arm/mach-ux500/clock.c11
1 files changed, 4 insertions, 7 deletions
diff --git a/arch/arm/mach-ux500/clock.c b/arch/arm/mach-ux500/clock.c
index 1d8509d59c09..7d107be63eb4 100644
--- a/arch/arm/mach-ux500/clock.c
+++ b/arch/arm/mach-ux500/clock.c
@@ -636,15 +636,12 @@ static struct dentry *clk_debugfs_register_dir(struct clk *c,
struct dentry *p_dentry)
{
struct dentry *d, *clk_d;
- char s[255];
- char *p = s;
+ const char *p = c->name;
- if (c->name == NULL)
- p += sprintf(p, "BUG");
- else
- p += sprintf(p, "%s", c->name);
+ if (!p)
+ p = "BUG";
- clk_d = debugfs_create_dir(s, p_dentry);
+ clk_d = debugfs_create_dir(p, p_dentry);
if (!clk_d)
return NULL;