diff options
Diffstat (limited to 'drivers/s390/char/con3215.c')
-rw-r--r-- | drivers/s390/char/con3215.c | 22 |
1 files changed, 9 insertions, 13 deletions
diff --git a/drivers/s390/char/con3215.c b/drivers/s390/char/con3215.c index 04dc734805c6..21639d6c996f 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> |
@@ -735,7 +732,7 @@ static int raw3215_pm_stop(struct ccw_device *cdev) | |||
735 | unsigned long flags; | 732 | unsigned long flags; |
736 | 733 | ||
737 | /* Empty the output buffer, then prevent new I/O. */ | 734 | /* Empty the output buffer, then prevent new I/O. */ |
738 | raw = cdev->dev.driver_data; | 735 | raw = dev_get_drvdata(&cdev->dev); |
739 | spin_lock_irqsave(get_ccwdev_lock(raw->cdev), flags); | 736 | spin_lock_irqsave(get_ccwdev_lock(raw->cdev), flags); |
740 | raw3215_make_room(raw, RAW3215_BUFFER_SIZE); | 737 | raw3215_make_room(raw, RAW3215_BUFFER_SIZE); |
741 | raw->flags |= RAW3215_FROZEN; | 738 | raw->flags |= RAW3215_FROZEN; |
@@ -749,7 +746,7 @@ static int raw3215_pm_start(struct ccw_device *cdev) | |||
749 | unsigned long flags; | 746 | unsigned long flags; |
750 | 747 | ||
751 | /* Allow I/O again and flush output buffer. */ | 748 | /* Allow I/O again and flush output buffer. */ |
752 | raw = cdev->dev.driver_data; | 749 | raw = dev_get_drvdata(&cdev->dev); |
753 | spin_lock_irqsave(get_ccwdev_lock(raw->cdev), flags); | 750 | spin_lock_irqsave(get_ccwdev_lock(raw->cdev), flags); |
754 | raw->flags &= ~RAW3215_FROZEN; | 751 | raw->flags &= ~RAW3215_FROZEN; |
755 | raw->flags |= RAW3215_FLUSHING; | 752 | raw->flags |= RAW3215_FLUSHING; |
@@ -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 | } |