diff options
author | Jeremy Kerr <jk@ozlabs.org> | 2006-07-12 01:40:29 -0400 |
---|---|---|
committer | Paul Mackerras <paulus@samba.org> | 2006-07-31 01:55:05 -0400 |
commit | 018a3d1db7cdb6127656c1622ee1d2302e16436d (patch) | |
tree | 5b6714fa9fcd1441f7c1b30e0391484c095925b6 /drivers/macintosh/windfarm_smu_controls.c | |
parent | eeb2b723ef5100fafa381d92eb70d83e98516a44 (diff) |
[POWERPC] powermac: Constify & voidify get_property()
Now that get_property() returns a void *, there's no need to cast its
return value. Also, treat the return value as const, so we can
constify get_property later.
powermac platform & macintosh driver changes.
Built for pmac32_defconfig, g5_defconfig
Signed-off-by: Jeremy Kerr <jk@ozlabs.org>
Signed-off-by: Paul Mackerras <paulus@samba.org>
Diffstat (limited to 'drivers/macintosh/windfarm_smu_controls.c')
-rw-r--r-- | drivers/macintosh/windfarm_smu_controls.c | 13 |
1 files changed, 7 insertions, 6 deletions
diff --git a/drivers/macintosh/windfarm_smu_controls.c b/drivers/macintosh/windfarm_smu_controls.c index a9e88edc0c72..bff1f372f188 100644 --- a/drivers/macintosh/windfarm_smu_controls.c +++ b/drivers/macintosh/windfarm_smu_controls.c | |||
@@ -159,14 +159,15 @@ static struct smu_fan_control *smu_fan_create(struct device_node *node, | |||
159 | int pwm_fan) | 159 | int pwm_fan) |
160 | { | 160 | { |
161 | struct smu_fan_control *fct; | 161 | struct smu_fan_control *fct; |
162 | s32 *v; u32 *reg; | 162 | const s32 *v; |
163 | char *l; | 163 | const u32 *reg; |
164 | const char *l; | ||
164 | 165 | ||
165 | fct = kmalloc(sizeof(struct smu_fan_control), GFP_KERNEL); | 166 | fct = kmalloc(sizeof(struct smu_fan_control), GFP_KERNEL); |
166 | if (fct == NULL) | 167 | if (fct == NULL) |
167 | return NULL; | 168 | return NULL; |
168 | fct->ctrl.ops = &smu_fan_ops; | 169 | fct->ctrl.ops = &smu_fan_ops; |
169 | l = (char *)get_property(node, "location", NULL); | 170 | l = get_property(node, "location", NULL); |
170 | if (l == NULL) | 171 | if (l == NULL) |
171 | goto fail; | 172 | goto fail; |
172 | 173 | ||
@@ -223,17 +224,17 @@ static struct smu_fan_control *smu_fan_create(struct device_node *node, | |||
223 | goto fail; | 224 | goto fail; |
224 | 225 | ||
225 | /* Get min & max values*/ | 226 | /* Get min & max values*/ |
226 | v = (s32 *)get_property(node, "min-value", NULL); | 227 | v = get_property(node, "min-value", NULL); |
227 | if (v == NULL) | 228 | if (v == NULL) |
228 | goto fail; | 229 | goto fail; |
229 | fct->min = *v; | 230 | fct->min = *v; |
230 | v = (s32 *)get_property(node, "max-value", NULL); | 231 | v = get_property(node, "max-value", NULL); |
231 | if (v == NULL) | 232 | if (v == NULL) |
232 | goto fail; | 233 | goto fail; |
233 | fct->max = *v; | 234 | fct->max = *v; |
234 | 235 | ||
235 | /* Get "reg" value */ | 236 | /* Get "reg" value */ |
236 | reg = (u32 *)get_property(node, "reg", NULL); | 237 | reg = get_property(node, "reg", NULL); |
237 | if (reg == NULL) | 238 | if (reg == NULL) |
238 | goto fail; | 239 | goto fail; |
239 | fct->reg = *reg; | 240 | fct->reg = *reg; |