git://git.onelab.eu
/
linux-2.6.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
fedora core 6 1.2949 + vserver 2.2.0
[linux-2.6.git]
/
drivers
/
macintosh
/
windfarm_smu_sensors.c
diff --git
a/drivers/macintosh/windfarm_smu_sensors.c
b/drivers/macintosh/windfarm_smu_sensors.c
index
bed25dc
..
01b4c50
100644
(file)
--- a/
drivers/macintosh/windfarm_smu_sensors.c
+++ b/
drivers/macintosh/windfarm_smu_sensors.c
@@
-67,7
+67,7
@@
static void smu_ads_release(struct wf_sensor *sr)
static int smu_read_adc(u8 id, s32 *value)
{
struct smu_simple_cmd cmd;
static int smu_read_adc(u8 id, s32 *value)
{
struct smu_simple_cmd cmd;
- DECLARE_COMPLETION(comp);
+ DECLARE_COMPLETION
_ONSTACK
(comp);
int rc;
rc = smu_queue_simple(&cmd, SMU_CMD_READ_ADC, 1,
int rc;
rc = smu_queue_simple(&cmd, SMU_CMD_READ_ADC, 1,
@@
-198,14
+198,14
@@
static struct wf_sensor_ops smu_slotspow_ops = {
static struct smu_ad_sensor *smu_ads_create(struct device_node *node)
{
struct smu_ad_sensor *ads;
static struct smu_ad_sensor *smu_ads_create(struct device_node *node)
{
struct smu_ad_sensor *ads;
- char *c, *l;
- u32 *v;
+ c
onst c
har *c, *l;
+
const
u32 *v;
ads = kmalloc(sizeof(struct smu_ad_sensor), GFP_KERNEL);
if (ads == NULL)
return NULL;
ads = kmalloc(sizeof(struct smu_ad_sensor), GFP_KERNEL);
if (ads == NULL)
return NULL;
- c =
(char *)
get_property(node, "device_type", NULL);
- l =
(char *)
get_property(node, "location", NULL);
+ c = get_property(node, "device_type", NULL);
+ l = get_property(node, "location", NULL);
if (c == NULL || l == NULL)
goto fail;
if (c == NULL || l == NULL)
goto fail;
@@
-255,7
+255,7
@@
static struct smu_ad_sensor *smu_ads_create(struct device_node *node)
} else
goto fail;
} else
goto fail;
- v =
(u32 *)
get_property(node, "reg", NULL);
+ v = get_property(node, "reg", NULL);
if (v == NULL)
goto fail;
ads->reg = *v;
if (v == NULL)
goto fail;
ads->reg = *v;
@@
-382,7
+382,7
@@
smu_cpu_power_create(struct wf_sensor *volts, struct wf_sensor *amps)
static void smu_fetch_param_partitions(void)
{
static void smu_fetch_param_partitions(void)
{
- struct smu_sdbp_header *hdr;
+
const
struct smu_sdbp_header *hdr;
/* Get CPU voltage/current/power calibration data */
hdr = smu_get_sdb_partition(SMU_SDB_CPUVCP_ID, NULL);
/* Get CPU voltage/current/power calibration data */
hdr = smu_get_sdb_partition(SMU_SDB_CPUVCP_ID, NULL);