wctdm24xxp, wcte12xp, wct4xxp, wcb4xxp, wctdm: Do not support suspend.

These drivers (all DAHDI drivers) should explicitly block suspend if they are
loaded.

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@9882 a0bf4364-ded3-4de4-8d8a-66a801d63aff
This commit is contained in:
Shaun Ruffell 2011-04-04 16:25:09 +00:00
parent c5396b1366
commit 731388e275
7 changed files with 37 additions and 3 deletions

View File

@ -3065,11 +3065,17 @@ static DEFINE_PCI_DEVICE_TABLE(b4xx_ids) =
}; };
static int b4xx_suspend(struct pci_dev *pdev, pm_message_t state)
{
return -ENOSYS;
}
static struct pci_driver b4xx_driver = { static struct pci_driver b4xx_driver = {
.name = "wcb4xxp", .name = "wcb4xxp",
.probe = b4xx_probe, .probe = b4xx_probe,
.remove = __devexit_p(b4xxp_remove), .remove = __devexit_p(b4xxp_remove),
.id_table = b4xx_ids, .id_table = b4xx_ids,
.suspend = b4xx_suspend,
}; };
static int __init b4xx_init(void) static int __init b4xx_init(void)

View File

@ -4979,6 +4979,11 @@ static void _t4_shutdown(struct pci_dev *pdev)
} }
#endif #endif
static int t4_suspend(struct pci_dev *pdev, pm_message_t state)
{
return -ENOSYS;
}
static struct pci_driver t4_driver = { static struct pci_driver t4_driver = {
.name = "wct4xxp", .name = "wct4xxp",
.probe = t4_init_one, .probe = t4_init_one,
@ -4986,6 +4991,7 @@ static struct pci_driver t4_driver = {
#if LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 12) #if LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 12)
.shutdown = _t4_shutdown, .shutdown = _t4_shutdown,
#endif #endif
.suspend = t4_suspend,
.id_table = t4_pci_tbl, .id_table = t4_pci_tbl,
}; };

View File

@ -3721,11 +3721,17 @@ static DEFINE_PCI_DEVICE_TABLE(wctc4xxp_pci_tbl) = {
MODULE_DEVICE_TABLE(pci, wctc4xxp_pci_tbl); MODULE_DEVICE_TABLE(pci, wctc4xxp_pci_tbl);
static int wctc4xxp_suspend(struct pci_dev *pdev, pm_message_t state)
{
return -ENOSYS;
}
static struct pci_driver wctc4xxp_driver = { static struct pci_driver wctc4xxp_driver = {
.name = "wctc4xxp", .name = "wctc4xxp",
.probe = wctc4xxp_init_one, .probe = wctc4xxp_init_one,
.remove = __devexit_p(wctc4xxp_remove_one), .remove = __devexit_p(wctc4xxp_remove_one),
.id_table = wctc4xxp_pci_tbl, .id_table = wctc4xxp_pci_tbl,
.suspend = wctc4xxp_suspend,
}; };
static int __init wctc4xxp_init(void) static int __init wctc4xxp_init(void)

View File

@ -2765,12 +2765,16 @@ static DEFINE_PCI_DEVICE_TABLE(wctdm_pci_tbl) = {
MODULE_DEVICE_TABLE(pci, wctdm_pci_tbl); MODULE_DEVICE_TABLE(pci, wctdm_pci_tbl);
static int wctdm_suspend(struct pci_dev *pdev, pm_message_t state)
{
return -ENOSYS;
}
static struct pci_driver wctdm_driver = { static struct pci_driver wctdm_driver = {
.name = "wctdm", .name = "wctdm",
.probe = wctdm_init_one, .probe = wctdm_init_one,
.remove =__devexit_p(wctdm_remove_one), .remove =__devexit_p(wctdm_remove_one),
.suspend = NULL, .suspend = wctdm_suspend,
.resume = NULL,
.id_table = wctdm_pci_tbl, .id_table = wctdm_pci_tbl,
}; };

View File

@ -4902,6 +4902,11 @@ static void wctdm_shutdown(struct pci_dev *pdev)
MODULE_DEVICE_TABLE(pci, wctdm_pci_tbl); MODULE_DEVICE_TABLE(pci, wctdm_pci_tbl);
static int wctdm_suspend(struct pci_dev *pdev, pm_message_t state)
{
return -ENOSYS;
}
static struct pci_driver wctdm_driver = { static struct pci_driver wctdm_driver = {
.name = "wctdm24xxp", .name = "wctdm24xxp",
.probe = wctdm_init_one, .probe = wctdm_init_one,
@ -4909,6 +4914,7 @@ static struct pci_driver wctdm_driver = {
#if LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 12) #if LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 12)
.shutdown = wctdm_shutdown, .shutdown = wctdm_shutdown,
#endif #endif
.suspend = wctdm_suspend,
.id_table = wctdm_pci_tbl, .id_table = wctdm_pci_tbl,
}; };

View File

@ -2377,6 +2377,11 @@ static void te12xp_shutdown(struct pci_dev *pdev)
} }
#endif #endif
static int te12xp_suspend(struct pci_dev *pdev, pm_message_t state)
{
return -ENOSYS;
}
MODULE_DEVICE_TABLE(pci, te12xp_pci_tbl); MODULE_DEVICE_TABLE(pci, te12xp_pci_tbl);
static struct pci_driver te12xp_driver = { static struct pci_driver te12xp_driver = {
@ -2386,6 +2391,7 @@ static struct pci_driver te12xp_driver = {
#if LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 12) #if LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 12)
.shutdown = te12xp_shutdown, .shutdown = te12xp_shutdown,
#endif #endif
.suspend = te12xp_suspend,
.id_table = te12xp_pci_tbl, .id_table = te12xp_pci_tbl,
}; };

View File

@ -1312,7 +1312,7 @@ wait_for_completion_interruptible_timeout(struct completion *x,
return timeout; return timeout;
} }
#endif #endif
typedef u32 __bitwise pm_message_t;
#endif /* 2.6.11 */ #endif /* 2.6.11 */
#endif /* 2.6.12 */ #endif /* 2.6.12 */
#endif /* 2.6.14 */ #endif /* 2.6.14 */