summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorShaun Ruffell <sruffell@digium.com>2011-04-04 16:25:03 +0000
committerShaun Ruffell <sruffell@digium.com>2011-04-04 16:25:03 +0000
commit295b0c79dfe4eb175f02797f142c2a059af7b370 (patch)
tree4bd16725238739887f449a371183c4e09c412212
parent18fabdcaf495630add47f21c1c135f4244579ac9 (diff)
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 <sruffell@digium.com> Acked-by: Michael Spiceland <mspiceland@digium.com> Acked-by: Kinsey Moore <kmoore@digium.com> git-svn-id: http://svn.asterisk.org/svn/dahdi/linux/trunk@9881 a0bf4364-ded3-4de4-8d8a-66a801d63aff
-rw-r--r--drivers/dahdi/wct4xxp/base.c11
1 files changed, 11 insertions, 0 deletions
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,
};