diff options
author | Shaun Ruffell <sruffell@digium.com> | 2012-03-22 18:36:06 +0000 |
---|---|---|
committer | Shaun Ruffell <sruffell@digium.com> | 2012-03-22 18:36:06 +0000 |
commit | 21e75aa4a69920a58a7632388c0098ffd290aed5 (patch) | |
tree | 3dfdd67870cf4eb1d9f59722c9ce3e72511eb54d | |
parent | 9d98bcf1dbc1adbe381c5b4e07e1c4e14be2a971 (diff) |
dahdi_dynamic_eth: Fix compilation on kernels < 2.6.22.
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 <oron.peled@xorcom.com>
Signed-off-by: Shaun Ruffell <sruffell@digium.com>
Origin: http://svnview.digium.com/svn/dahdi?view=rev&rev=10588
git-svn-id: http://svn.asterisk.org/svn/dahdi/linux/branches/2.6@10592 a0bf4364-ded3-4de4-8d8a-66a801d63aff
-rw-r--r-- | drivers/dahdi/dahdi_dynamic_eth.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/drivers/dahdi/dahdi_dynamic_eth.c b/drivers/dahdi/dahdi_dynamic_eth.c index 0db3736..31df67e 100644 --- a/drivers/dahdi/dahdi_dynamic_eth.c +++ b/drivers/dahdi/dahdi_dynamic_eth.c @@ -453,7 +453,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); |