diff options
author | Jeff Garzik <jeff@garzik.org> | 2006-09-24 01:52:47 -0400 |
---|---|---|
committer | Jeff Garzik <jeff@garzik.org> | 2006-09-24 01:52:47 -0400 |
commit | 23930fa1cebfea6f79881c588ccd1b0781e49e3f (patch) | |
tree | 36d29e3f83661c4f5f45b6f74ac0d5f9886867a8 /drivers/macintosh/windfarm_smu_controls.c | |
parent | 36b35a5be0e4b406acd816e2122d153e875105be (diff) | |
parent | 4f5537de7c1531398e84e18a24f667e49cc94208 (diff) |
Merge branch 'master' into upstream
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; |