aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/edac/edac_mc.c
diff options
context:
space:
mode:
authorDouglas Thompson <dougthompson@xmission.com>2007-07-19 04:50:01 -0400
committerLinus Torvalds <torvalds@woody.linux-foundation.org>2007-07-19 13:04:54 -0400
commit86aa8cb7bc47fe786df073246055d69d98e6330a (patch)
tree391f85de03e0deeb44aa73f62633cc750a4cf609 /drivers/edac/edac_mc.c
parent542b25881a6ae1bf0804d4d39bf8b4d2cfc25e42 (diff)
drivers/edac: cleanup workq ifdefs
The origin of this code comes from patches at sourceforge, that allow EDAC to be updated to various kernels. With kernel version 2.6.20 a new workq system was installed, thus the patches needed to be modified based on the kernel version. For submitting to the latest kernel.org those #ifdefs are removed Signed-off-by: Douglas Thompson <dougthompson@xmission.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'drivers/edac/edac_mc.c')
-rw-r--r--drivers/edac/edac_mc.c10
1 files changed, 0 insertions, 10 deletions
diff --git a/drivers/edac/edac_mc.c b/drivers/edac/edac_mc.c
index 835319126bb6..ce12d9b5ab18 100644
--- a/drivers/edac/edac_mc.c
+++ b/drivers/edac/edac_mc.c
@@ -235,16 +235,10 @@ static int edac_mc_assert_error_check_and_clear(void)
235 * edac_mc_workq_function 235 * edac_mc_workq_function
236 * performs the operation scheduled by a workq request 236 * performs the operation scheduled by a workq request
237 */ 237 */
238#if (LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,20))
239static void edac_mc_workq_function(struct work_struct *work_req) 238static void edac_mc_workq_function(struct work_struct *work_req)
240{ 239{
241 struct delayed_work *d_work = (struct delayed_work *)work_req; 240 struct delayed_work *d_work = (struct delayed_work *)work_req;
242 struct mem_ctl_info *mci = to_edac_mem_ctl_work(d_work); 241 struct mem_ctl_info *mci = to_edac_mem_ctl_work(d_work);
243#else
244static void edac_mc_workq_function(void *ptr)
245{
246 struct mem_ctl_info *mci = (struct mem_ctl_info *)ptr;
247#endif
248 242
249 mutex_lock(&mem_ctls_mutex); 243 mutex_lock(&mem_ctls_mutex);
250 244
@@ -274,11 +268,7 @@ void edac_mc_workq_setup(struct mem_ctl_info *mci, unsigned msec)
274{ 268{
275 debugf0("%s()\n", __func__); 269 debugf0("%s()\n", __func__);
276 270
277#if (LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,20))
278 INIT_DELAYED_WORK(&mci->work, edac_mc_workq_function); 271 INIT_DELAYED_WORK(&mci->work, edac_mc_workq_function);
279#else
280 INIT_WORK(&mci->work, edac_mc_workq_function, mci);
281#endif
282 queue_delayed_work(edac_workqueue, &mci->work, msecs_to_jiffies(msec)); 272 queue_delayed_work(edac_workqueue, &mci->work, msecs_to_jiffies(msec));
283} 273}
284 274