aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/edac/edac_pci.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_pci.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_pci.c')
-rw-r--r--drivers/edac/edac_pci.c10
1 files changed, 0 insertions, 10 deletions
diff --git a/drivers/edac/edac_pci.c b/drivers/edac/edac_pci.c
index abefd96680d..ac16b434a3c 100644
--- a/drivers/edac/edac_pci.c
+++ b/drivers/edac/edac_pci.c
@@ -214,16 +214,10 @@ EXPORT_SYMBOL_GPL(edac_pci_find);
214 * edac_pci_workq_function() 214 * edac_pci_workq_function()
215 * performs the operation scheduled by a workq request 215 * performs the operation scheduled by a workq request
216 */ 216 */
217#if (LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,20))
218static void edac_pci_workq_function(struct work_struct *work_req) 217static void edac_pci_workq_function(struct work_struct *work_req)
219{ 218{
220 struct delayed_work *d_work = (struct delayed_work *)work_req; 219 struct delayed_work *d_work = (struct delayed_work *)work_req;
221 struct edac_pci_ctl_info *pci = to_edac_pci_ctl_work(d_work); 220 struct edac_pci_ctl_info *pci = to_edac_pci_ctl_work(d_work);
222#else
223static void edac_pci_workq_function(void *ptr)
224{
225 struct edac_pci_ctl_info *pci = ptr;
226#endif
227 221
228 edac_lock_pci_list(); 222 edac_lock_pci_list();
229 223
@@ -248,11 +242,7 @@ static void edac_pci_workq_setup(struct edac_pci_ctl_info *pci,
248{ 242{
249 debugf0("%s()\n", __func__); 243 debugf0("%s()\n", __func__);
250 244
251#if (LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,20))
252 INIT_DELAYED_WORK(&pci->work, edac_pci_workq_function); 245 INIT_DELAYED_WORK(&pci->work, edac_pci_workq_function);
253#else
254 INIT_WORK(&pci->work, edac_pci_workq_function, pci);
255#endif
256 queue_delayed_work(edac_workqueue, &pci->work, 246 queue_delayed_work(edac_workqueue, &pci->work,
257 msecs_to_jiffies(edac_pci_get_poll_msec())); 247 msecs_to_jiffies(edac_pci_get_poll_msec()));
258} 248}