diff options
author | Shaun Ruffell <sruffell@digium.com> | 2011-04-04 16:25:09 +0000 |
---|---|---|
committer | Shaun Ruffell <sruffell@digium.com> | 2011-04-04 16:25:09 +0000 |
commit | 8409e8bbb725c79c750d5f52169155736aaafaa1 (patch) | |
tree | 30d1de3d4aac2f18bc2b611925953ed53dd31560 | |
parent | 23240110298c0255fd12346c36b5eb177ddc3304 (diff) |
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
-rw-r--r-- | drivers/dahdi/wcb4xxp/base.c | 6 | ||||
-rw-r--r-- | drivers/dahdi/wct4xxp/base.c | 6 | ||||
-rw-r--r-- | drivers/dahdi/wctc4xxp/base.c | 6 | ||||
-rw-r--r-- | drivers/dahdi/wctdm.c | 8 | ||||
-rw-r--r-- | drivers/dahdi/wctdm24xxp/base.c | 6 | ||||
-rw-r--r-- | drivers/dahdi/wcte12xp/base.c | 6 | ||||
-rw-r--r-- | include/dahdi/kernel.h | 2 |
7 files changed, 37 insertions, 3 deletions
diff --git a/drivers/dahdi/wcb4xxp/base.c b/drivers/dahdi/wcb4xxp/base.c index ebe93b2..f10c652 100644 --- a/drivers/dahdi/wcb4xxp/base.c +++ b/drivers/dahdi/wcb4xxp/base.c @@ -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 = { .name = "wcb4xxp", .probe = b4xx_probe, .remove = __devexit_p(b4xxp_remove), .id_table = b4xx_ids, + .suspend = b4xx_suspend, }; static int __init b4xx_init(void) diff --git a/drivers/dahdi/wct4xxp/base.c b/drivers/dahdi/wct4xxp/base.c index 923ed93..97a1f3c 100644 --- a/drivers/dahdi/wct4xxp/base.c +++ b/drivers/dahdi/wct4xxp/base.c @@ -4979,6 +4979,11 @@ static void _t4_shutdown(struct pci_dev *pdev) } #endif +static int t4_suspend(struct pci_dev *pdev, pm_message_t state) +{ + return -ENOSYS; +} + static struct pci_driver t4_driver = { .name = "wct4xxp", .probe = t4_init_one, @@ -4986,6 +4991,7 @@ static struct pci_driver t4_driver = { #if LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 12) .shutdown = _t4_shutdown, #endif + .suspend = t4_suspend, .id_table = t4_pci_tbl, }; diff --git a/drivers/dahdi/wctc4xxp/base.c b/drivers/dahdi/wctc4xxp/base.c index 2f771f2..7264621 100644 --- a/drivers/dahdi/wctc4xxp/base.c +++ b/drivers/dahdi/wctc4xxp/base.c @@ -3721,11 +3721,17 @@ static DEFINE_PCI_DEVICE_TABLE(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 = { .name = "wctc4xxp", .probe = wctc4xxp_init_one, .remove = __devexit_p(wctc4xxp_remove_one), .id_table = wctc4xxp_pci_tbl, + .suspend = wctc4xxp_suspend, }; static int __init wctc4xxp_init(void) diff --git a/drivers/dahdi/wctdm.c b/drivers/dahdi/wctdm.c index 411795c..9c56865 100644 --- a/drivers/dahdi/wctdm.c +++ b/drivers/dahdi/wctdm.c @@ -2765,12 +2765,16 @@ static DEFINE_PCI_DEVICE_TABLE(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 = { .name = "wctdm", .probe = wctdm_init_one, .remove =__devexit_p(wctdm_remove_one), - .suspend = NULL, - .resume = NULL, + .suspend = wctdm_suspend, .id_table = wctdm_pci_tbl, }; diff --git a/drivers/dahdi/wctdm24xxp/base.c b/drivers/dahdi/wctdm24xxp/base.c index 9a9ad87..003904d 100644 --- a/drivers/dahdi/wctdm24xxp/base.c +++ b/drivers/dahdi/wctdm24xxp/base.c @@ -4902,6 +4902,11 @@ static void wctdm_shutdown(struct pci_dev *pdev) 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 = { .name = "wctdm24xxp", .probe = wctdm_init_one, @@ -4909,6 +4914,7 @@ static struct pci_driver wctdm_driver = { #if LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 12) .shutdown = wctdm_shutdown, #endif + .suspend = wctdm_suspend, .id_table = wctdm_pci_tbl, }; diff --git a/drivers/dahdi/wcte12xp/base.c b/drivers/dahdi/wcte12xp/base.c index 4a290bc..987de9b 100644 --- a/drivers/dahdi/wcte12xp/base.c +++ b/drivers/dahdi/wcte12xp/base.c @@ -2377,6 +2377,11 @@ static void te12xp_shutdown(struct pci_dev *pdev) } #endif +static int te12xp_suspend(struct pci_dev *pdev, pm_message_t state) +{ + return -ENOSYS; +} + MODULE_DEVICE_TABLE(pci, te12xp_pci_tbl); 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) .shutdown = te12xp_shutdown, #endif + .suspend = te12xp_suspend, .id_table = te12xp_pci_tbl, }; diff --git a/include/dahdi/kernel.h b/include/dahdi/kernel.h index bd39192..c289429 100644 --- a/include/dahdi/kernel.h +++ b/include/dahdi/kernel.h @@ -1312,7 +1312,7 @@ wait_for_completion_interruptible_timeout(struct completion *x, return timeout; } #endif - +typedef u32 __bitwise pm_message_t; #endif /* 2.6.11 */ #endif /* 2.6.12 */ #endif /* 2.6.14 */ |