diff options
author | Peter Oberparleiter | 2021-06-11 11:11:36 +0200 |
---|---|---|
committer | Vasily Gorbik | 2021-06-18 16:41:20 +0200 |
commit | fc8ebe820b595e1e53d7d0419bae59e3624fc7ef (patch) | |
tree | 23e65ac088ec4ff9c93195dcf246762a60f36baf /drivers/s390/char | |
parent | 2f554d8b0a1e1b8b84af744f7dda38f74e21b180 (diff) |
s390/sclp: Remove memory hotplug power management support
Power management support was removed for s390 with
commit 394216275c7d ("s390: remove broken hibernate / power management
support").
Remove leftover sclp memory hotplug-related power management code.
Acked-by: Heiko Carstens <hca@linux.ibm.com>
Signed-off-by: Peter Oberparleiter <oberpar@linux.ibm.com>
Signed-off-by: Vasily Gorbik <gor@linux.ibm.com>
Diffstat (limited to 'drivers/s390/char')
-rw-r--r-- | drivers/s390/char/sclp_cmd.c | 34 |
1 files changed, 0 insertions, 34 deletions
diff --git a/drivers/s390/char/sclp_cmd.c b/drivers/s390/char/sclp_cmd.c index d41bc144c183..ab0518cfdcfe 100644 --- a/drivers/s390/char/sclp_cmd.c +++ b/drivers/s390/char/sclp_cmd.c @@ -20,7 +20,6 @@ #include <linux/mmzone.h> #include <linux/memory.h> #include <linux/module.h> -#include <linux/platform_device.h> #include <asm/ctl_reg.h> #include <asm/chpid.h> #include <asm/setup.h> @@ -168,7 +167,6 @@ static DEFINE_MUTEX(sclp_mem_mutex); static LIST_HEAD(sclp_mem_list); static u8 sclp_max_storage_id; static DECLARE_BITMAP(sclp_storage_ids, 256); -static int sclp_mem_state_changed; struct memory_increment { struct list_head list; @@ -359,8 +357,6 @@ static int sclp_mem_notifier(struct notifier_block *nb, rc = -EINVAL; break; } - if (!rc) - sclp_mem_state_changed = 1; mutex_unlock(&sclp_mem_mutex); return rc ? NOTIFY_BAD : NOTIFY_OK; } @@ -456,28 +452,8 @@ static void __init insert_increment(u16 rn, int standby, int assigned) list_add(&new_incr->list, prev); } -static int sclp_mem_freeze(struct device *dev) -{ - if (!sclp_mem_state_changed) - return 0; - pr_err("Memory hotplug state changed, suspend refused.\n"); - return -EPERM; -} - -static const struct dev_pm_ops sclp_mem_pm_ops = { - .freeze = sclp_mem_freeze, -}; - -static struct platform_driver sclp_mem_pdrv = { - .driver = { - .name = "sclp_mem", - .pm = &sclp_mem_pm_ops, - }, -}; - static int __init sclp_detect_standby_memory(void) { - struct platform_device *sclp_pdev; struct read_storage_sccb *sccb; int i, id, assigned, rc; @@ -530,17 +506,7 @@ static int __init sclp_detect_standby_memory(void) rc = register_memory_notifier(&sclp_mem_nb); if (rc) goto out; - rc = platform_driver_register(&sclp_mem_pdrv); - if (rc) - goto out; - sclp_pdev = platform_device_register_simple("sclp_mem", -1, NULL, 0); - rc = PTR_ERR_OR_ZERO(sclp_pdev); - if (rc) - goto out_driver; sclp_add_standby_memory(); - goto out; -out_driver: - platform_driver_unregister(&sclp_mem_pdrv); out: free_page((unsigned long) sccb); return rc; |