diff options
author | Stephen Rothwell <sfr@canb.auug.org.au> | 2012-05-02 16:19:43 -0400 |
---|---|---|
committer | Benjamin Herrenschmidt <benh@kernel.crashing.org> | 2012-05-03 02:54:54 -0400 |
commit | 43671cc96e58458b2711f1e97ff24a4c0e7cd1ac (patch) | |
tree | b470fccaad237c362b5fb94b068f1fd985633198 /drivers/macintosh | |
parent | ca7d593e0ac8cf806aa750815daf12594345f5f6 (diff) |
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 72dfe191235b..e2989cef2309 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, | |||
287 | sens->sat = sat; | 287 | sens->sat = sat; |
288 | sens->sens.ops = &wf_sat_ops; | 288 | sens->sens.ops = &wf_sat_ops; |
289 | sens->sens.name = (char *) (sens + 1); | 289 | sens->sens.name = (char *) (sens + 1); |
290 | snprintf(sens->sens.name, 16, "%s-%d", name, cpu); | 290 | snprintf((char *)sens->sens.name, 16, "%s-%d", name, cpu); |
291 | 291 | ||
292 | if (wf_register_sensor(&sens->sens)) | 292 | if (wf_register_sensor(&sens->sens)) |
293 | kfree(sens); | 293 | kfree(sens); |
@@ -314,7 +314,7 @@ static int wf_sat_probe(struct i2c_client *client, | |||
314 | sens->sat = sat; | 314 | sens->sat = sat; |
315 | sens->sens.ops = &wf_sat_ops; | 315 | sens->sens.ops = &wf_sat_ops; |
316 | sens->sens.name = (char *) (sens + 1); | 316 | sens->sens.name = (char *) (sens + 1); |
317 | snprintf(sens->sens.name, 16, "cpu-power-%d", cpu); | 317 | snprintf((char *)sens->sens.name, 16, "cpu-power-%d", cpu); |
318 | 318 | ||
319 | if (wf_register_sensor(&sens->sens)) | 319 | if (wf_register_sensor(&sens->sens)) |
320 | kfree(sens); | 320 | kfree(sens); |