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_sensors.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_sensors.c')
-rw-r--r-- | drivers/macintosh/windfarm_smu_sensors.c | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/drivers/macintosh/windfarm_smu_sensors.c b/drivers/macintosh/windfarm_smu_sensors.c index bed25dcf8a1e..defe9922ebd1 100644 --- a/drivers/macintosh/windfarm_smu_sensors.c +++ b/drivers/macintosh/windfarm_smu_sensors.c | |||
@@ -198,14 +198,14 @@ static struct wf_sensor_ops smu_slotspow_ops = { | |||
198 | static struct smu_ad_sensor *smu_ads_create(struct device_node *node) | 198 | static struct smu_ad_sensor *smu_ads_create(struct device_node *node) |
199 | { | 199 | { |
200 | struct smu_ad_sensor *ads; | 200 | struct smu_ad_sensor *ads; |
201 | char *c, *l; | 201 | const char *c, *l; |
202 | u32 *v; | 202 | const u32 *v; |
203 | 203 | ||
204 | ads = kmalloc(sizeof(struct smu_ad_sensor), GFP_KERNEL); | 204 | ads = kmalloc(sizeof(struct smu_ad_sensor), GFP_KERNEL); |
205 | if (ads == NULL) | 205 | if (ads == NULL) |
206 | return NULL; | 206 | return NULL; |
207 | c = (char *)get_property(node, "device_type", NULL); | 207 | c = get_property(node, "device_type", NULL); |
208 | l = (char *)get_property(node, "location", NULL); | 208 | l = get_property(node, "location", NULL); |
209 | if (c == NULL || l == NULL) | 209 | if (c == NULL || l == NULL) |
210 | goto fail; | 210 | goto fail; |
211 | 211 | ||
@@ -255,7 +255,7 @@ static struct smu_ad_sensor *smu_ads_create(struct device_node *node) | |||
255 | } else | 255 | } else |
256 | goto fail; | 256 | goto fail; |
257 | 257 | ||
258 | v = (u32 *)get_property(node, "reg", NULL); | 258 | v = get_property(node, "reg", NULL); |
259 | if (v == NULL) | 259 | if (v == NULL) |
260 | goto fail; | 260 | goto fail; |
261 | ads->reg = *v; | 261 | ads->reg = *v; |
@@ -382,7 +382,7 @@ smu_cpu_power_create(struct wf_sensor *volts, struct wf_sensor *amps) | |||
382 | 382 | ||
383 | static void smu_fetch_param_partitions(void) | 383 | static void smu_fetch_param_partitions(void) |
384 | { | 384 | { |
385 | struct smu_sdbp_header *hdr; | 385 | const struct smu_sdbp_header *hdr; |
386 | 386 | ||
387 | /* Get CPU voltage/current/power calibration data */ | 387 | /* Get CPU voltage/current/power calibration data */ |
388 | hdr = smu_get_sdb_partition(SMU_SDB_CPUVCP_ID, NULL); | 388 | hdr = smu_get_sdb_partition(SMU_SDB_CPUVCP_ID, NULL); |