diff options
author | Stephen Rothwell <sfr@canb.auug.org.au> | 2012-05-02 20:19:43 +0000 |
---|---|---|
committer | Benjamin Herrenschmidt <benh@kernel.crashing.org> | 2012-05-03 16:54:54 +1000 |
commit | 43671cc96e58458b2711f1e97ff24a4c0e7cd1ac (patch) | |
tree | b470fccaad237c362b5fb94b068f1fd985633198 /drivers/macintosh | |
parent | ca7d593e0ac8cf806aa750815daf12594345f5f6 (diff) | |
download | op-kernel-dev-43671cc96e58458b2711f1e97ff24a4c0e7cd1ac.zip op-kernel-dev-43671cc96e58458b2711f1e97ff24a4c0e7cd1ac.tar.gz |
powerpc/windfarm: don't pass const strings to snprintf
Fixes these build warnings:
drivers/macintosh/windfarm_smu_sat.c: In function 'wf_sat_probe':
drivers/macintosh/windfarm_smu_sat.c:290:3: warning: passing argument 1 of 'snprintf' discards qualifiers from pointer target type
include/linux/kernel.h:323:5: note: expected 'char *' but argument is of type 'const char *'
drivers/macintosh/windfarm_smu_sat.c:317:3: warning: passing argument 1 of 'snprintf' discards qualifiers from pointer target type
include/linux/kernel.h:323:5: note: expected 'char *' but argument is of type 'const char *'
Introduced by commit e074d08e2b98 ("powerpc/windfarm: const'ify and add
"priv" field to controls & sensors").
Signed-off-by: Stephen Rothwell <sfr@canb.auug.org.au>
Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Diffstat (limited to 'drivers/macintosh')
-rw-r--r-- | drivers/macintosh/windfarm_smu_sat.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/macintosh/windfarm_smu_sat.c b/drivers/macintosh/windfarm_smu_sat.c index 72dfe19..e2989ce 100644 --- a/drivers/macintosh/windfarm_smu_sat.c +++ b/drivers/macintosh/windfarm_smu_sat.c @@ -287,7 +287,7 @@ static int wf_sat_probe(struct i2c_client *client, sens->sat = sat; sens->sens.ops = &wf_sat_ops; sens->sens.name = (char *) (sens + 1); - snprintf(sens->sens.name, 16, "%s-%d", name, cpu); + snprintf((char *)sens->sens.name, 16, "%s-%d", name, cpu); if (wf_register_sensor(&sens->sens)) kfree(sens); @@ -314,7 +314,7 @@ static int wf_sat_probe(struct i2c_client *client, sens->sat = sat; sens->sens.ops = &wf_sat_ops; sens->sens.name = (char *) (sens + 1); - snprintf(sens->sens.name, 16, "cpu-power-%d", cpu); + snprintf((char *)sens->sens.name, 16, "cpu-power-%d", cpu); if (wf_register_sensor(&sens->sens)) kfree(sens); |