aboutsummaryrefslogtreecommitdiffstats
path: root/arch
diff options
context:
space:
mode:
authorAnton Blanchard <anton@samba.org>2012-03-21 11:53:43 -0400
committerBenjamin Herrenschmidt <benh@kernel.crashing.org>2012-03-27 20:31:59 -0400
commit587f83e8dd50d22bc0c62e32ec49fd319b0912fe (patch)
tree991fb39cc33b12f16b7a269852b7e3915f848a14 /arch
parent55fc0c561742c710857dc5a7a591b461a561cf1f (diff)
powerpc/pseries: Use rtas_get_sensor in RAS code
We have rtas_get_sensor so we may as well use it. Signed-off-by: Anton Blanchard <anton@samba.org> Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Diffstat (limited to 'arch')
-rw-r--r--arch/powerpc/platforms/pseries/ras.c5
1 files changed, 1 insertions, 4 deletions
diff --git a/arch/powerpc/platforms/pseries/ras.c b/arch/powerpc/platforms/pseries/ras.c
index 4246d7b9dce9..670b45bde8f1 100644
--- a/arch/powerpc/platforms/pseries/ras.c
+++ b/arch/powerpc/platforms/pseries/ras.c
@@ -59,7 +59,6 @@ static DEFINE_SPINLOCK(ras_log_buf_lock);
59static char global_mce_data_buf[RTAS_ERROR_LOG_MAX]; 59static char global_mce_data_buf[RTAS_ERROR_LOG_MAX];
60static DEFINE_PER_CPU(__u64, mce_data_buf); 60static DEFINE_PER_CPU(__u64, mce_data_buf);
61 61
62static int ras_get_sensor_state_token;
63static int ras_check_exception_token; 62static int ras_check_exception_token;
64 63
65#define EPOW_SENSOR_TOKEN 9 64#define EPOW_SENSOR_TOKEN 9
@@ -77,7 +76,6 @@ static int __init init_ras_IRQ(void)
77{ 76{
78 struct device_node *np; 77 struct device_node *np;
79 78
80 ras_get_sensor_state_token = rtas_token("get-sensor-state");
81 ras_check_exception_token = rtas_token("check-exception"); 79 ras_check_exception_token = rtas_token("check-exception");
82 80
83 /* Internal Errors */ 81 /* Internal Errors */
@@ -213,8 +211,7 @@ static irqreturn_t ras_epow_interrupt(int irq, void *dev_id)
213 int state; 211 int state;
214 int critical; 212 int critical;
215 213
216 status = rtas_call(ras_get_sensor_state_token, 2, 2, &state, 214 status = rtas_get_sensor(EPOW_SENSOR_TOKEN, EPOW_SENSOR_INDEX, &state);
217 EPOW_SENSOR_TOKEN, EPOW_SENSOR_INDEX);
218 215
219 if (state > 3) 216 if (state > 3)
220 critical = 1; /* Time Critical */ 217 critical = 1; /* Time Critical */