Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit e54d9391 authored by Prasad Sodagudi's avatar Prasad Sodagudi Committed by Gerrit - the friendly Code Review server
Browse files

edac: device: Use poll_msec from registered EDAC device



Currently, the EDAC framework ignores the EDAC device driver
specified polling period, and instead forces the polling period
to be one second.

Use the polling period defined by the driver that registered
with an edac device with the EDAC framework.

Change-Id: I6a27db7b02d9d13a8d2d7911357e1c3ccf7ac63a
Signed-off-by: default avatarPrasad Sodagudi <psodagud@codeaurora.org>
Signed-off-by: default avatarIsaac J. Manjarres <isaacm@codeaurora.org>
parent 22ea3159
Loading
Loading
Loading
Loading
+10 −2
Original line number Diff line number Diff line
@@ -384,8 +384,16 @@ static void edac_device_workq_setup(struct edac_device_ctl_info *edac_dev,

	/* take the arg 'msec' and set it into the control structure
	 * to used in the time period calculation
	 * then calc the number of jiffies that represents
	 * then calc the number of jiffies that represents. Also, force
	 * polling period to 1 second if it is smaller than that, as
	 * anything less than 1 second does not make sense.
	 */
	if (msec <= 1000) {
		edac_device_printk(edac_dev, KERN_WARNING,
				   "Forcing polling period to 1 second\n");
		msec = 1000;
	}

	edac_dev->poll_msec = msec;
	edac_dev->delay = msecs_to_jiffies(msec);

@@ -481,7 +489,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;
	}