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
This commit is contained in:
Shaun Ruffell 2011-04-04 16:25:03 +00:00
parent 58c1168185
commit c5396b1366

View File

@ -4971,10 +4971,21 @@ static DEFINE_PCI_DEVICE_TABLE(t4_pci_tbl) =
{ 0, } { 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 = { static struct pci_driver t4_driver = {
.name = "wct4xxp", .name = "wct4xxp",
.probe = t4_init_one, .probe = t4_init_one,
.remove = __devexit_p(t4_remove_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, .id_table = t4_pci_tbl,
}; };