aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/s390
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/s390')
-rw-r--r--drivers/s390/char/sclp_vt220.c18
1 files changed, 5 insertions, 13 deletions
diff --git a/drivers/s390/char/sclp_vt220.c b/drivers/s390/char/sclp_vt220.c
index 5518e24946aa..178724f2a4c3 100644
--- a/drivers/s390/char/sclp_vt220.c
+++ b/drivers/s390/char/sclp_vt220.c
@@ -20,7 +20,6 @@
20#include <linux/major.h> 20#include <linux/major.h>
21#include <linux/console.h> 21#include <linux/console.h>
22#include <linux/kdev_t.h> 22#include <linux/kdev_t.h>
23#include <linux/bootmem.h>
24#include <linux/interrupt.h> 23#include <linux/interrupt.h>
25#include <linux/init.h> 24#include <linux/init.h>
26#include <linux/reboot.h> 25#include <linux/reboot.h>
@@ -601,10 +600,7 @@ static void __init __sclp_vt220_free_pages(void)
601 600
602 list_for_each_safe(page, p, &sclp_vt220_empty) { 601 list_for_each_safe(page, p, &sclp_vt220_empty) {
603 list_del(page); 602 list_del(page);
604 if (slab_is_available()) 603 free_page((unsigned long) page);
605 free_page((unsigned long) page);
606 else
607 free_bootmem((unsigned long) page, PAGE_SIZE);
608 } 604 }
609} 605}
610 606
@@ -640,16 +636,12 @@ static int __init __sclp_vt220_init(int num_pages)
640 sclp_vt220_flush_later = 0; 636 sclp_vt220_flush_later = 0;
641 637
642 /* Allocate pages for output buffering */ 638 /* Allocate pages for output buffering */
639 rc = -ENOMEM;
643 for (i = 0; i < num_pages; i++) { 640 for (i = 0; i < num_pages; i++) {
644 if (slab_is_available()) 641 page = (void *) get_zeroed_page(GFP_KERNEL | GFP_DMA);
645 page = (void *) get_zeroed_page(GFP_KERNEL | GFP_DMA); 642 if (!page)
646 else
647 page = alloc_bootmem_low_pages(PAGE_SIZE);
648 if (!page) {
649 rc = -ENOMEM;
650 goto out; 643 goto out;
651 } 644 list_add_tail(page, &sclp_vt220_empty);
652 list_add_tail((struct list_head *) page, &sclp_vt220_empty);
653 } 645 }
654 rc = sclp_register(&sclp_vt220_register); 646 rc = sclp_register(&sclp_vt220_register);
655out: 647out: