aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/edac/edac_device.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/edac/edac_device.c')
-rw-r--r--drivers/edac/edac_device.c23
1 files changed, 1 insertions, 22 deletions
diff --git a/drivers/edac/edac_device.c b/drivers/edac/edac_device.c
index 3f4c8a28154a..3db8effa1fd0 100644
--- a/drivers/edac/edac_device.c
+++ b/drivers/edac/edac_device.c
@@ -418,27 +418,6 @@ void edac_device_reset_delay_period(
418 unlock_device_list(); 418 unlock_device_list();
419} 419}
420 420
421/*
422 * edac_op_state_toString(edac_dev)
423 */
424static char *edac_op_state_toString(struct edac_device_ctl_info *edac_dev)
425{
426 int opstate = edac_dev->op_state;
427
428 if (opstate == OP_RUNNING_POLL)
429 return "POLLED";
430 else if (opstate == OP_RUNNING_INTERRUPT)
431 return "INTERRUPT";
432 else if (opstate == OP_RUNNING_POLL_INTR)
433 return "POLL-INTR";
434 else if (opstate == OP_ALLOC)
435 return "ALLOC";
436 else if (opstate == OP_OFFLINE)
437 return "OFFLINE";
438
439 return "UNKNOWN";
440}
441
442/** 421/**
443 * edac_device_add_device: Insert the 'edac_dev' structure into the 422 * edac_device_add_device: Insert the 'edac_dev' structure into the
444 * edac_device global list and create sysfs entries associated with 423 * edac_device global list and create sysfs entries associated with
@@ -496,7 +475,7 @@ int edac_device_add_device(struct edac_device_ctl_info *edac_dev, int edac_idx)
496 edac_dev->mod_name, 475 edac_dev->mod_name,
497 edac_dev->ctl_name, 476 edac_dev->ctl_name,
498 dev_name(edac_dev), 477 dev_name(edac_dev),
499 edac_op_state_toString(edac_dev) 478 edac_op_state_toString(edac_dev->op_state)
500 ); 479 );
501 480
502 unlock_device_list(); 481 unlock_device_list();