[PATCH v4 12/16] EDAC/device: Make use of poll_msec value in edac_device_ctl_info struct
From: Manivannan Sadhasivam
Date: Thu Dec 22 2022 - 08:19:41 EST
The EDAC drivers may optionally pass the poll_msec value. Use that value if
available, else fall back to 1000ms.
Cc: <stable@xxxxxxxxxxxxxxx> # 4.9
Fixes: e27e3dac6517 ("drivers/edac: add edac_device class")
Reported-by: Luca Weiss <luca.weiss@xxxxxxxxxxxxx>
Signed-off-by: Manivannan Sadhasivam <manivannan.sadhasivam@xxxxxxxxxx>
---
drivers/edac/edac_device.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/edac/edac_device.c b/drivers/edac/edac_device.c
index 19522c568aa5..19c3ab2a434e 100644
--- a/drivers/edac/edac_device.c
+++ b/drivers/edac/edac_device.c
@@ -447,7 +447,7 @@ int edac_device_add_device(struct edac_device_ctl_info *edac_dev)
* enable workq processing on this instance,
* default = 1000 msec
*/
- edac_device_workq_setup(edac_dev, 1000);
+ edac_device_workq_setup(edac_dev, edac_dev->poll_msec ? edac_dev->poll_msec : 1000);
} else {
edac_dev->op_state = OP_RUNNING_INTERRUPT;
}
--
2.25.1