diff options
author | Benjamin Herrenschmidt <benh@kernel.crashing.org> | 2011-03-07 01:02:49 -0500 |
---|---|---|
committer | Benjamin Herrenschmidt <benh@kernel.crashing.org> | 2011-04-01 00:37:27 -0400 |
commit | 65e646ac509ff45e9f35e7fc1fea0d2b6723679f (patch) | |
tree | 133fad23140d0b084f4150cf92eeb27971cfbff2 /drivers | |
parent | 62cc67b9df273be18fcb09a071592dedf751c90a (diff) |
powerpc/pmac: Rename cpu_state in therm_pm72 to avoid collision
This collides with the cpu_state in our SMP code, use processor_state
instead.
Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/macintosh/therm_pm72.c | 60 |
1 files changed, 30 insertions, 30 deletions
diff --git a/drivers/macintosh/therm_pm72.c b/drivers/macintosh/therm_pm72.c index bca2af2e3760..c987033714f6 100644 --- a/drivers/macintosh/therm_pm72.c +++ b/drivers/macintosh/therm_pm72.c | |||
@@ -153,7 +153,7 @@ static struct i2c_adapter * u3_0; | |||
153 | static struct i2c_adapter * u3_1; | 153 | static struct i2c_adapter * u3_1; |
154 | static struct i2c_adapter * k2; | 154 | static struct i2c_adapter * k2; |
155 | static struct i2c_client * fcu; | 155 | static struct i2c_client * fcu; |
156 | static struct cpu_pid_state cpu_state[2]; | 156 | static struct cpu_pid_state processor_state[2]; |
157 | static struct basckside_pid_params backside_params; | 157 | static struct basckside_pid_params backside_params; |
158 | static struct backside_pid_state backside_state; | 158 | static struct backside_pid_state backside_state; |
159 | static struct drives_pid_state drives_state; | 159 | static struct drives_pid_state drives_state; |
@@ -664,8 +664,8 @@ static int read_eeprom(int cpu, struct mpu_data *out) | |||
664 | 664 | ||
665 | static void fetch_cpu_pumps_minmax(void) | 665 | static void fetch_cpu_pumps_minmax(void) |
666 | { | 666 | { |
667 | struct cpu_pid_state *state0 = &cpu_state[0]; | 667 | struct cpu_pid_state *state0 = &processor_state[0]; |
668 | struct cpu_pid_state *state1 = &cpu_state[1]; | 668 | struct cpu_pid_state *state1 = &processor_state[1]; |
669 | u16 pump_min = 0, pump_max = 0xffff; | 669 | u16 pump_min = 0, pump_max = 0xffff; |
670 | u16 tmp[4]; | 670 | u16 tmp[4]; |
671 | 671 | ||
@@ -717,17 +717,17 @@ static ssize_t show_##name(struct device *dev, struct device_attribute *attr, ch | |||
717 | return sprintf(buf, "%d", data); \ | 717 | return sprintf(buf, "%d", data); \ |
718 | } | 718 | } |
719 | 719 | ||
720 | BUILD_SHOW_FUNC_FIX(cpu0_temperature, cpu_state[0].last_temp) | 720 | BUILD_SHOW_FUNC_FIX(cpu0_temperature, processor_state[0].last_temp) |
721 | BUILD_SHOW_FUNC_FIX(cpu0_voltage, cpu_state[0].voltage) | 721 | BUILD_SHOW_FUNC_FIX(cpu0_voltage, processor_state[0].voltage) |
722 | BUILD_SHOW_FUNC_FIX(cpu0_current, cpu_state[0].current_a) | 722 | BUILD_SHOW_FUNC_FIX(cpu0_current, processor_state[0].current_a) |
723 | BUILD_SHOW_FUNC_INT(cpu0_exhaust_fan_rpm, cpu_state[0].rpm) | 723 | BUILD_SHOW_FUNC_INT(cpu0_exhaust_fan_rpm, processor_state[0].rpm) |
724 | BUILD_SHOW_FUNC_INT(cpu0_intake_fan_rpm, cpu_state[0].intake_rpm) | 724 | BUILD_SHOW_FUNC_INT(cpu0_intake_fan_rpm, processor_state[0].intake_rpm) |
725 | 725 | ||
726 | BUILD_SHOW_FUNC_FIX(cpu1_temperature, cpu_state[1].last_temp) | 726 | BUILD_SHOW_FUNC_FIX(cpu1_temperature, processor_state[1].last_temp) |
727 | BUILD_SHOW_FUNC_FIX(cpu1_voltage, cpu_state[1].voltage) | 727 | BUILD_SHOW_FUNC_FIX(cpu1_voltage, processor_state[1].voltage) |
728 | BUILD_SHOW_FUNC_FIX(cpu1_current, cpu_state[1].current_a) | 728 | BUILD_SHOW_FUNC_FIX(cpu1_current, processor_state[1].current_a) |
729 | BUILD_SHOW_FUNC_INT(cpu1_exhaust_fan_rpm, cpu_state[1].rpm) | 729 | BUILD_SHOW_FUNC_INT(cpu1_exhaust_fan_rpm, processor_state[1].rpm) |
730 | BUILD_SHOW_FUNC_INT(cpu1_intake_fan_rpm, cpu_state[1].intake_rpm) | 730 | BUILD_SHOW_FUNC_INT(cpu1_intake_fan_rpm, processor_state[1].intake_rpm) |
731 | 731 | ||
732 | BUILD_SHOW_FUNC_FIX(backside_temperature, backside_state.last_temp) | 732 | BUILD_SHOW_FUNC_FIX(backside_temperature, backside_state.last_temp) |
733 | BUILD_SHOW_FUNC_INT(backside_fan_pwm, backside_state.pwm) | 733 | BUILD_SHOW_FUNC_INT(backside_fan_pwm, backside_state.pwm) |
@@ -919,8 +919,8 @@ static void do_cpu_pid(struct cpu_pid_state *state, s32 temp, s32 power) | |||
919 | 919 | ||
920 | static void do_monitor_cpu_combined(void) | 920 | static void do_monitor_cpu_combined(void) |
921 | { | 921 | { |
922 | struct cpu_pid_state *state0 = &cpu_state[0]; | 922 | struct cpu_pid_state *state0 = &processor_state[0]; |
923 | struct cpu_pid_state *state1 = &cpu_state[1]; | 923 | struct cpu_pid_state *state1 = &processor_state[1]; |
924 | s32 temp0, power0, temp1, power1; | 924 | s32 temp0, power0, temp1, power1; |
925 | s32 temp_combi, power_combi; | 925 | s32 temp_combi, power_combi; |
926 | int rc, intake, pump; | 926 | int rc, intake, pump; |
@@ -1150,7 +1150,7 @@ static void do_monitor_cpu_rack(struct cpu_pid_state *state) | |||
1150 | /* | 1150 | /* |
1151 | * Initialize the state structure for one CPU control loop | 1151 | * Initialize the state structure for one CPU control loop |
1152 | */ | 1152 | */ |
1153 | static int init_cpu_state(struct cpu_pid_state *state, int index) | 1153 | static int init_processor_state(struct cpu_pid_state *state, int index) |
1154 | { | 1154 | { |
1155 | int err; | 1155 | int err; |
1156 | 1156 | ||
@@ -1205,7 +1205,7 @@ static int init_cpu_state(struct cpu_pid_state *state, int index) | |||
1205 | /* | 1205 | /* |
1206 | * Dispose of the state data for one CPU control loop | 1206 | * Dispose of the state data for one CPU control loop |
1207 | */ | 1207 | */ |
1208 | static void dispose_cpu_state(struct cpu_pid_state *state) | 1208 | static void dispose_processor_state(struct cpu_pid_state *state) |
1209 | { | 1209 | { |
1210 | if (state->monitor == NULL) | 1210 | if (state->monitor == NULL) |
1211 | return; | 1211 | return; |
@@ -1804,9 +1804,9 @@ static int main_control_loop(void *x) | |||
1804 | set_pwm_fan(SLOTS_FAN_PWM_INDEX, SLOTS_FAN_DEFAULT_PWM); | 1804 | set_pwm_fan(SLOTS_FAN_PWM_INDEX, SLOTS_FAN_DEFAULT_PWM); |
1805 | 1805 | ||
1806 | /* Initialize ADCs */ | 1806 | /* Initialize ADCs */ |
1807 | initialize_adc(&cpu_state[0]); | 1807 | initialize_adc(&processor_state[0]); |
1808 | if (cpu_state[1].monitor != NULL) | 1808 | if (processor_state[1].monitor != NULL) |
1809 | initialize_adc(&cpu_state[1]); | 1809 | initialize_adc(&processor_state[1]); |
1810 | 1810 | ||
1811 | fcu_tickle_ticks = FCU_TICKLE_TICKS; | 1811 | fcu_tickle_ticks = FCU_TICKLE_TICKS; |
1812 | 1812 | ||
@@ -1833,14 +1833,14 @@ static int main_control_loop(void *x) | |||
1833 | if (cpu_pid_type == CPU_PID_TYPE_COMBINED) | 1833 | if (cpu_pid_type == CPU_PID_TYPE_COMBINED) |
1834 | do_monitor_cpu_combined(); | 1834 | do_monitor_cpu_combined(); |
1835 | else if (cpu_pid_type == CPU_PID_TYPE_RACKMAC) { | 1835 | else if (cpu_pid_type == CPU_PID_TYPE_RACKMAC) { |
1836 | do_monitor_cpu_rack(&cpu_state[0]); | 1836 | do_monitor_cpu_rack(&processor_state[0]); |
1837 | if (cpu_state[1].monitor != NULL) | 1837 | if (processor_state[1].monitor != NULL) |
1838 | do_monitor_cpu_rack(&cpu_state[1]); | 1838 | do_monitor_cpu_rack(&processor_state[1]); |
1839 | // better deal with UP | 1839 | // better deal with UP |
1840 | } else { | 1840 | } else { |
1841 | do_monitor_cpu_split(&cpu_state[0]); | 1841 | do_monitor_cpu_split(&processor_state[0]); |
1842 | if (cpu_state[1].monitor != NULL) | 1842 | if (processor_state[1].monitor != NULL) |
1843 | do_monitor_cpu_split(&cpu_state[1]); | 1843 | do_monitor_cpu_split(&processor_state[1]); |
1844 | // better deal with UP | 1844 | // better deal with UP |
1845 | } | 1845 | } |
1846 | /* Then, the rest */ | 1846 | /* Then, the rest */ |
@@ -1885,8 +1885,8 @@ static int main_control_loop(void *x) | |||
1885 | */ | 1885 | */ |
1886 | static void dispose_control_loops(void) | 1886 | static void dispose_control_loops(void) |
1887 | { | 1887 | { |
1888 | dispose_cpu_state(&cpu_state[0]); | 1888 | dispose_processor_state(&processor_state[0]); |
1889 | dispose_cpu_state(&cpu_state[1]); | 1889 | dispose_processor_state(&processor_state[1]); |
1890 | dispose_backside_state(&backside_state); | 1890 | dispose_backside_state(&backside_state); |
1891 | dispose_drives_state(&drives_state); | 1891 | dispose_drives_state(&drives_state); |
1892 | dispose_slots_state(&slots_state); | 1892 | dispose_slots_state(&slots_state); |
@@ -1928,12 +1928,12 @@ static int create_control_loops(void) | |||
1928 | /* Create control loops for everything. If any fail, everything | 1928 | /* Create control loops for everything. If any fail, everything |
1929 | * fails | 1929 | * fails |
1930 | */ | 1930 | */ |
1931 | if (init_cpu_state(&cpu_state[0], 0)) | 1931 | if (init_processor_state(&processor_state[0], 0)) |
1932 | goto fail; | 1932 | goto fail; |
1933 | if (cpu_pid_type == CPU_PID_TYPE_COMBINED) | 1933 | if (cpu_pid_type == CPU_PID_TYPE_COMBINED) |
1934 | fetch_cpu_pumps_minmax(); | 1934 | fetch_cpu_pumps_minmax(); |
1935 | 1935 | ||
1936 | if (cpu_count > 1 && init_cpu_state(&cpu_state[1], 1)) | 1936 | if (cpu_count > 1 && init_processor_state(&processor_state[1], 1)) |
1937 | goto fail; | 1937 | goto fail; |
1938 | if (init_backside_state(&backside_state)) | 1938 | if (init_backside_state(&backside_state)) |
1939 | goto fail; | 1939 | goto fail; |