From c5396b13660cc8e3c7a97ecba6c9b8b342ff1e31 Mon Sep 17 00:00:00 2001 From: Shaun Ruffell Date: Mon, 4 Apr 2011 16:25:03 +0000 Subject: [PATCH] wct4xxp: Add shutdown handler for kexec. Makes the driver a little more kexec friendly when sharing an interrupt line with another device. Signed-off-by: Shaun Ruffell Acked-by: Michael Spiceland Acked-by: Kinsey Moore git-svn-id: http://svn.asterisk.org/svn/dahdi/linux/trunk@9881 a0bf4364-ded3-4de4-8d8a-66a801d63aff --- drivers/dahdi/wct4xxp/base.c | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/drivers/dahdi/wct4xxp/base.c b/drivers/dahdi/wct4xxp/base.c index 3d7c89b..923ed93 100644 --- a/drivers/dahdi/wct4xxp/base.c +++ b/drivers/dahdi/wct4xxp/base.c @@ -4971,10 +4971,21 @@ static DEFINE_PCI_DEVICE_TABLE(t4_pci_tbl) = { 0, } }; +#if LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 12) +static void _t4_shutdown(struct pci_dev *pdev) +{ + struct t4 *wc = pci_get_drvdata(pdev); + t4_hardware_stop(wc); +} +#endif + static struct pci_driver t4_driver = { .name = "wct4xxp", .probe = t4_init_one, .remove = __devexit_p(t4_remove_one), +#if LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 12) + .shutdown = _t4_shutdown, +#endif .id_table = t4_pci_tbl, };