diff options
author | Johannes Berg <johannes@sipsolutions.net> | 2007-12-11 09:21:26 -0500 |
---|---|---|
committer | Paul Mackerras <paulus@samba.org> | 2007-12-18 23:00:59 -0500 |
commit | b819a9bfc7ae5a1ab5bab18c7e0dbe40bf2289a9 (patch) | |
tree | 28f856484658f54b7d7d5c3e8aa08c9006a82321 /drivers | |
parent | c9f6d3d5c6d4f4cd3a53549a69c92951180e2a76 (diff) |
[POWERPC] via-pmu: Kill sleep notifiers completely
This kills off the remnants of the old sleep notifiers now that they
are no longer used.
Signed-off-by: Johannes Berg <johannes@sipsolutions.net>
Cc: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Signed-off-by: Paul Mackerras <paulus@samba.org>
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/macintosh/via-pmu.c | 71 |
1 files changed, 0 insertions, 71 deletions
diff --git a/drivers/macintosh/via-pmu.c b/drivers/macintosh/via-pmu.c index 35e1f22089d6..6df3f3503e5b 100644 --- a/drivers/macintosh/via-pmu.c +++ b/drivers/macintosh/via-pmu.c | |||
@@ -174,7 +174,6 @@ static struct proc_dir_entry *proc_pmu_batt[PMU_MAX_BATTERIES]; | |||
174 | 174 | ||
175 | int __fake_sleep; | 175 | int __fake_sleep; |
176 | int asleep; | 176 | int asleep; |
177 | BLOCKING_NOTIFIER_HEAD(sleep_notifier_list); | ||
178 | 177 | ||
179 | #ifdef CONFIG_ADB | 178 | #ifdef CONFIG_ADB |
180 | static int adb_dev_map; | 179 | static int adb_dev_map; |
@@ -1719,67 +1718,7 @@ pmu_present(void) | |||
1719 | return via != 0; | 1718 | return via != 0; |
1720 | } | 1719 | } |
1721 | 1720 | ||
1722 | #ifdef CONFIG_PM_SLEEP | ||
1723 | |||
1724 | static LIST_HEAD(sleep_notifiers); | ||
1725 | |||
1726 | int | ||
1727 | pmu_register_sleep_notifier(struct pmu_sleep_notifier *n) | ||
1728 | { | ||
1729 | struct list_head *list; | ||
1730 | struct pmu_sleep_notifier *notifier; | ||
1731 | |||
1732 | for (list = sleep_notifiers.next; list != &sleep_notifiers; | ||
1733 | list = list->next) { | ||
1734 | notifier = list_entry(list, struct pmu_sleep_notifier, list); | ||
1735 | if (n->priority > notifier->priority) | ||
1736 | break; | ||
1737 | } | ||
1738 | __list_add(&n->list, list->prev, list); | ||
1739 | return 0; | ||
1740 | } | ||
1741 | EXPORT_SYMBOL(pmu_register_sleep_notifier); | ||
1742 | |||
1743 | int | ||
1744 | pmu_unregister_sleep_notifier(struct pmu_sleep_notifier* n) | ||
1745 | { | ||
1746 | if (n->list.next == 0) | ||
1747 | return -ENOENT; | ||
1748 | list_del(&n->list); | ||
1749 | n->list.next = NULL; | ||
1750 | return 0; | ||
1751 | } | ||
1752 | EXPORT_SYMBOL(pmu_unregister_sleep_notifier); | ||
1753 | #endif /* CONFIG_PM_SLEEP */ | ||
1754 | |||
1755 | #if defined(CONFIG_PM_SLEEP) && defined(CONFIG_PPC32) | 1721 | #if defined(CONFIG_PM_SLEEP) && defined(CONFIG_PPC32) |
1756 | |||
1757 | /* Sleep is broadcast last-to-first */ | ||
1758 | static void broadcast_sleep(int when) | ||
1759 | { | ||
1760 | struct list_head *list; | ||
1761 | struct pmu_sleep_notifier *notifier; | ||
1762 | |||
1763 | for (list = sleep_notifiers.prev; list != &sleep_notifiers; | ||
1764 | list = list->prev) { | ||
1765 | notifier = list_entry(list, struct pmu_sleep_notifier, list); | ||
1766 | notifier->notifier_call(notifier, when); | ||
1767 | } | ||
1768 | } | ||
1769 | |||
1770 | /* Wake is broadcast first-to-last */ | ||
1771 | static void broadcast_wake(void) | ||
1772 | { | ||
1773 | struct list_head *list; | ||
1774 | struct pmu_sleep_notifier *notifier; | ||
1775 | |||
1776 | for (list = sleep_notifiers.next; list != &sleep_notifiers; | ||
1777 | list = list->next) { | ||
1778 | notifier = list_entry(list, struct pmu_sleep_notifier, list); | ||
1779 | notifier->notifier_call(notifier, PBOOK_WAKE); | ||
1780 | } | ||
1781 | } | ||
1782 | |||
1783 | /* | 1722 | /* |
1784 | * This struct is used to store config register values for | 1723 | * This struct is used to store config register values for |
1785 | * PCI devices which may get powered off when we sleep. | 1724 | * PCI devices which may get powered off when we sleep. |
@@ -1962,9 +1901,6 @@ pmac_suspend_devices(void) | |||
1962 | 1901 | ||
1963 | pm_prepare_console(); | 1902 | pm_prepare_console(); |
1964 | 1903 | ||
1965 | /* Notify old-style device drivers */ | ||
1966 | broadcast_sleep(PBOOK_SLEEP_REQUEST); | ||
1967 | |||
1968 | /* Sync the disks. */ | 1904 | /* Sync the disks. */ |
1969 | /* XXX It would be nice to have some way to ensure that | 1905 | /* XXX It would be nice to have some way to ensure that |
1970 | * nobody is dirtying any new buffers while we wait. That | 1906 | * nobody is dirtying any new buffers while we wait. That |
@@ -1973,12 +1909,9 @@ pmac_suspend_devices(void) | |||
1973 | */ | 1909 | */ |
1974 | sys_sync(); | 1910 | sys_sync(); |
1975 | 1911 | ||
1976 | broadcast_sleep(PBOOK_SLEEP_NOW); | ||
1977 | |||
1978 | /* Send suspend call to devices, hold the device core's dpm_sem */ | 1912 | /* Send suspend call to devices, hold the device core's dpm_sem */ |
1979 | ret = device_suspend(PMSG_SUSPEND); | 1913 | ret = device_suspend(PMSG_SUSPEND); |
1980 | if (ret) { | 1914 | if (ret) { |
1981 | broadcast_wake(); | ||
1982 | printk(KERN_ERR "Driver sleep failed\n"); | 1915 | printk(KERN_ERR "Driver sleep failed\n"); |
1983 | return -EBUSY; | 1916 | return -EBUSY; |
1984 | } | 1917 | } |
@@ -2019,7 +1952,6 @@ pmac_suspend_devices(void) | |||
2019 | local_irq_enable(); | 1952 | local_irq_enable(); |
2020 | preempt_enable(); | 1953 | preempt_enable(); |
2021 | device_resume(); | 1954 | device_resume(); |
2022 | broadcast_wake(); | ||
2023 | printk(KERN_ERR "Driver powerdown failed\n"); | 1955 | printk(KERN_ERR "Driver powerdown failed\n"); |
2024 | return -EBUSY; | 1956 | return -EBUSY; |
2025 | } | 1957 | } |
@@ -2073,9 +2005,6 @@ pmac_wakeup_devices(void) | |||
2073 | /* Resume devices */ | 2005 | /* Resume devices */ |
2074 | device_resume(); | 2006 | device_resume(); |
2075 | 2007 | ||
2076 | /* Notify old style drivers */ | ||
2077 | broadcast_wake(); | ||
2078 | |||
2079 | pm_restore_console(); | 2008 | pm_restore_console(); |
2080 | 2009 | ||
2081 | return 0; | 2010 | return 0; |