Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 106048
b: refs/heads/master
c: 096846e
h: refs/heads/master
v: v3
  • Loading branch information
Arthur Jones authored and Linus Torvalds committed Jul 25, 2008
1 parent 5d4f6e9 commit 1512485
Show file tree
Hide file tree
Showing 2 changed files with 22 additions and 2 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 14cc571bb1d072d3f4be2875ea520ab03e093471
refs/heads/master: 096846e2b0ef39cb7c348f837f06984ef6ba8aa7
22 changes: 21 additions & 1 deletion trunk/drivers/edac/edac_mc_sysfs.c
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,25 @@ int edac_mc_get_poll_msec(void)
return edac_mc_poll_msec;
}

static int edac_set_poll_msec(const char *val, struct kernel_param *kp)
{
long l;
int ret;

if (!val)
return -EINVAL;

ret = strict_strtol(val, 0, &l);
if (ret == -EINVAL || ((int)l != l))
return -EINVAL;
*((int *)kp->arg) = l;

/* notify edac_mc engine to reset the poll period */
edac_mc_reset_delay_period(l);

return 0;
}

/* Parameter declarations for above */
module_param(edac_mc_panic_on_ue, int, 0644);
MODULE_PARM_DESC(edac_mc_panic_on_ue, "Panic on uncorrected error: 0=off 1=on");
Expand All @@ -53,7 +72,8 @@ MODULE_PARM_DESC(edac_mc_log_ue,
module_param(edac_mc_log_ce, int, 0644);
MODULE_PARM_DESC(edac_mc_log_ce,
"Log correctable error to console: 0=off 1=on");
module_param(edac_mc_poll_msec, int, 0644);
module_param_call(edac_mc_poll_msec, edac_set_poll_msec, param_get_int,
&edac_mc_poll_msec, 0644);
MODULE_PARM_DESC(edac_mc_poll_msec, "Polling period in milliseconds");

/*
Expand Down

0 comments on commit 1512485

Please sign in to comment.