From 11378e4749bac8c4baaaf201e337da8a94b5c661 Mon Sep 17 00:00:00 2001 From: Shaun Ruffell Date: Thu, 22 Mar 2012 18:31:13 +0000 Subject: dahdi_dynamic_eth: Fix compilation on kernels < 2.6.22. MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Resolves the follwing build error: drivers/dahdi/dahdi_dynamic_eth.c: In function ‘ztdeth_exit’: drivers/dahdi/dahdi_dynamic_eth.c:448: error: implicit declaration of function ‘cancel_work_sync’ RHEL kernel versions 2.6.18-238 (5.6) and greater had cancel_work_sync() backported which is what I did my original smoke test on. Reported-by: Oron Peled Signed-off-by: Shaun Ruffell git-svn-id: http://svn.asterisk.org/svn/dahdi/linux/trunk@10588 a0bf4364-ded3-4de4-8d8a-66a801d63aff --- drivers/dahdi/dahdi_dynamic_eth.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/drivers/dahdi/dahdi_dynamic_eth.c b/drivers/dahdi/dahdi_dynamic_eth.c index ecf46ea..5ad0484 100644 --- a/drivers/dahdi/dahdi_dynamic_eth.c +++ b/drivers/dahdi/dahdi_dynamic_eth.c @@ -445,7 +445,11 @@ static int __init ztdeth_init(void) static void __exit ztdeth_exit(void) { +#if LINUX_VERSION_CODE < KERNEL_VERSION(2, 6, 22) + flush_scheduled_work(); +#else cancel_work_sync(&dahdi_dynamic_eth_flush_work); +#endif dev_remove_pack(&ztdeth_ptype); unregister_netdevice_notifier(&ztdeth_nblock); dahdi_dynamic_unregister_driver(&ztd_eth); -- cgit v1.2.3