aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/s390/char/con3215.c
diff options
context:
space:
mode:
authorHeiko Carstens <heiko.carstens@de.ibm.com>2009-06-22 06:08:04 -0400
committerMartin Schwidefsky <schwidefsky@de.ibm.com>2009-06-22 06:08:17 -0400
commit6d56eee2c016b0b131e444d02a66b0fef7df3ef0 (patch)
treea912728f53a098ace46ff7053617567fc47ea59e /drivers/s390/char/con3215.c
parentd7d1104fa40f66dbe50840f05b34268144f8a17a (diff)
[S390] 3215 console: convert from bootmem to slab
The slab allocator is earlier available so convert the bootmem allocations to slab/gfp allocations. Signed-off-by: Heiko Carstens <heiko.carstens@de.ibm.com> Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
Diffstat (limited to 'drivers/s390/char/con3215.c')
-rw-r--r--drivers/s390/char/con3215.c18
1 files changed, 7 insertions, 11 deletions
diff --git a/drivers/s390/char/con3215.c b/drivers/s390/char/con3215.c
index 04dc734805c6..51e6379c5b93 100644
--- a/drivers/s390/char/con3215.c
+++ b/drivers/s390/char/con3215.c
@@ -20,10 +20,7 @@
20#include <linux/interrupt.h> 20#include <linux/interrupt.h>
21#include <linux/err.h> 21#include <linux/err.h>
22#include <linux/reboot.h> 22#include <linux/reboot.h>
23
24#include <linux/slab.h> 23#include <linux/slab.h>
25#include <linux/bootmem.h>
26
27#include <asm/ccwdev.h> 24#include <asm/ccwdev.h>
28#include <asm/cio.h> 25#include <asm/cio.h>
29#include <asm/io.h> 26#include <asm/io.h>
@@ -883,7 +880,7 @@ static int __init con3215_init(void)
883 raw3215_freelist = NULL; 880 raw3215_freelist = NULL;
884 spin_lock_init(&raw3215_freelist_lock); 881 spin_lock_init(&raw3215_freelist_lock);
885 for (i = 0; i < NR_3215_REQ; i++) { 882 for (i = 0; i < NR_3215_REQ; i++) {
886 req = (struct raw3215_req *) alloc_bootmem_low(sizeof(struct raw3215_req)); 883 req = kzalloc(sizeof(struct raw3215_req), GFP_KERNEL | GFP_DMA);
887 req->next = raw3215_freelist; 884 req->next = raw3215_freelist;
888 raw3215_freelist = req; 885 raw3215_freelist = req;
889 } 886 }
@@ -893,10 +890,9 @@ static int __init con3215_init(void)
893 return -ENODEV; 890 return -ENODEV;
894 891
895 raw3215[0] = raw = (struct raw3215_info *) 892 raw3215[0] = raw = (struct raw3215_info *)
896 alloc_bootmem_low(sizeof(struct raw3215_info)); 893 kzalloc(sizeof(struct raw3215_info), GFP_KERNEL | GFP_DMA);
897 memset(raw, 0, sizeof(struct raw3215_info)); 894 raw->buffer = kzalloc(RAW3215_BUFFER_SIZE, GFP_KERNEL | GFP_DMA);
898 raw->buffer = (char *) alloc_bootmem_low(RAW3215_BUFFER_SIZE); 895 raw->inbuf = kzalloc(RAW3215_INBUF_SIZE, GFP_KERNEL | GFP_DMA);
899 raw->inbuf = (char *) alloc_bootmem_low(RAW3215_INBUF_SIZE);
900 raw->cdev = cdev; 896 raw->cdev = cdev;
901 dev_set_drvdata(&cdev->dev, raw); 897 dev_set_drvdata(&cdev->dev, raw);
902 cdev->handler = raw3215_irq; 898 cdev->handler = raw3215_irq;
@@ -906,9 +902,9 @@ static int __init con3215_init(void)
906 902
907 /* Request the console irq */ 903 /* Request the console irq */
908 if (raw3215_startup(raw) != 0) { 904 if (raw3215_startup(raw) != 0) {
909 free_bootmem((unsigned long) raw->inbuf, RAW3215_INBUF_SIZE); 905 kfree(raw->inbuf);
910 free_bootmem((unsigned long) raw->buffer, RAW3215_BUFFER_SIZE); 906 kfree(raw->buffer);
911 free_bootmem((unsigned long) raw, sizeof(struct raw3215_info)); 907 kfree(raw);
912 raw3215[0] = NULL; 908 raw3215[0] = NULL;
913 return -ENODEV; 909 return -ENODEV;
914 } 910 }