Skip to content

Commit 587f83e

Browse files
antonblanchardozbenh
authored andcommitted
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 <[email protected]> Signed-off-by: Benjamin Herrenschmidt <[email protected]>
1 parent 55fc0c5 commit 587f83e

File tree

1 file changed

+1
-4
lines changed
  • arch/powerpc/platforms/pseries

1 file changed

+1
-4
lines changed

arch/powerpc/platforms/pseries/ras.c

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,6 @@ static DEFINE_SPINLOCK(ras_log_buf_lock);
5959
static char global_mce_data_buf[RTAS_ERROR_LOG_MAX];
6060
static DEFINE_PER_CPU(__u64, mce_data_buf);
6161

62-
static int ras_get_sensor_state_token;
6362
static int ras_check_exception_token;
6463

6564
#define EPOW_SENSOR_TOKEN 9
@@ -77,7 +76,6 @@ static int __init init_ras_IRQ(void)
7776
{
7877
struct device_node *np;
7978

80-
ras_get_sensor_state_token = rtas_token("get-sensor-state");
8179
ras_check_exception_token = rtas_token("check-exception");
8280

8381
/* Internal Errors */
@@ -213,8 +211,7 @@ static irqreturn_t ras_epow_interrupt(int irq, void *dev_id)
213211
int state;
214212
int critical;
215213

216-
status = rtas_call(ras_get_sensor_state_token, 2, 2, &state,
217-
EPOW_SENSOR_TOKEN, EPOW_SENSOR_INDEX);
214+
status = rtas_get_sensor(EPOW_SENSOR_TOKEN, EPOW_SENSOR_INDEX, &state);
218215

219216
if (state > 3)
220217
critical = 1; /* Time Critical */

0 commit comments

Comments
 (0)