From 4ea6a48201cee49e2dea910a1e6baee217ae2649 Mon Sep 17 00:00:00 2001 From: Rohit Vaswani Date: Fri, 3 Oct 2014 14:22:49 -0700 Subject: [PATCH] edac: device: Use poll_msec from registered edac device instead of default Use the poll_msec set by the driver that registreed an edac device to define the poll time for how often the edac_check callback function should be scheduled. CRs-fixed: 1001207 Change-Id: I973d7fb966cb9f6f9497510df5de000d4f8ffcba Signed-off-by: Rohit Vaswani Signed-off-by: Abhimanyu Kapur --- drivers/edac/edac_device.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/drivers/edac/edac_device.c b/drivers/edac/edac_device.c index 27884ff645d8..47e5078292c4 100644 --- a/drivers/edac/edac_device.c +++ b/drivers/edac/edac_device.c @@ -411,6 +411,8 @@ void edac_device_workq_setup(struct edac_device_ctl_info *edac_dev, * to used in the time period calculation * then calc the number of jiffies that represents */ + if (!msec) + msec = 1000; edac_dev->poll_msec = msec; edac_dev->delay = msecs_to_jiffies(msec); @@ -530,7 +532,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); } else { edac_dev->op_state = OP_RUNNING_INTERRUPT; }