diff options
Diffstat (limited to 'drivers/s390')
-rw-r--r-- | drivers/s390/Makefile | 2 | ||||
-rw-r--r-- | drivers/s390/block/dcssblk.c | 11 | ||||
-rw-r--r-- | drivers/s390/crypto/ap_bus.c | 7 | ||||
-rw-r--r-- | drivers/s390/kvm/kvm_virtio.c | 5 | ||||
-rw-r--r-- | drivers/s390/net/cu3088.c | 7 | ||||
-rw-r--r-- | drivers/s390/net/qeth_core_main.c | 7 | ||||
-rw-r--r-- | drivers/s390/net/qeth_l2_main.c | 2 | ||||
-rw-r--r-- | drivers/s390/net/qeth_l3_main.c | 2 | ||||
-rw-r--r-- | drivers/s390/s390_rdev.c | 51 |
9 files changed, 17 insertions, 77 deletions
diff --git a/drivers/s390/Makefile b/drivers/s390/Makefile index 4f4e7cf105d4..d0eae59bc366 100644 --- a/drivers/s390/Makefile +++ b/drivers/s390/Makefile | |||
@@ -4,7 +4,7 @@ | |||
4 | 4 | ||
5 | CFLAGS_sysinfo.o += -Iinclude/math-emu -Iarch/s390/math-emu -w | 5 | CFLAGS_sysinfo.o += -Iinclude/math-emu -Iarch/s390/math-emu -w |
6 | 6 | ||
7 | obj-y += s390mach.o sysinfo.o s390_rdev.o | 7 | obj-y += s390mach.o sysinfo.o |
8 | obj-y += cio/ block/ char/ crypto/ net/ scsi/ kvm/ | 8 | obj-y += cio/ block/ char/ crypto/ net/ scsi/ kvm/ |
9 | 9 | ||
10 | drivers-y += drivers/s390/built-in.o | 10 | drivers-y += drivers/s390/built-in.o |
diff --git a/drivers/s390/block/dcssblk.c b/drivers/s390/block/dcssblk.c index 26ffc6ab441d..cfdcf1aed33c 100644 --- a/drivers/s390/block/dcssblk.c +++ b/drivers/s390/block/dcssblk.c | |||
@@ -18,7 +18,6 @@ | |||
18 | #include <asm/io.h> | 18 | #include <asm/io.h> |
19 | #include <linux/completion.h> | 19 | #include <linux/completion.h> |
20 | #include <linux/interrupt.h> | 20 | #include <linux/interrupt.h> |
21 | #include <asm/s390_rdev.h> | ||
22 | 21 | ||
23 | #define DCSSBLK_NAME "dcssblk" | 22 | #define DCSSBLK_NAME "dcssblk" |
24 | #define DCSSBLK_MINORS_PER_DISK 1 | 23 | #define DCSSBLK_MINORS_PER_DISK 1 |
@@ -946,7 +945,7 @@ dcssblk_check_params(void) | |||
946 | static void __exit | 945 | static void __exit |
947 | dcssblk_exit(void) | 946 | dcssblk_exit(void) |
948 | { | 947 | { |
949 | s390_root_dev_unregister(dcssblk_root_dev); | 948 | root_device_unregister(dcssblk_root_dev); |
950 | unregister_blkdev(dcssblk_major, DCSSBLK_NAME); | 949 | unregister_blkdev(dcssblk_major, DCSSBLK_NAME); |
951 | } | 950 | } |
952 | 951 | ||
@@ -955,22 +954,22 @@ dcssblk_init(void) | |||
955 | { | 954 | { |
956 | int rc; | 955 | int rc; |
957 | 956 | ||
958 | dcssblk_root_dev = s390_root_dev_register("dcssblk"); | 957 | dcssblk_root_dev = root_device_register("dcssblk"); |
959 | if (IS_ERR(dcssblk_root_dev)) | 958 | if (IS_ERR(dcssblk_root_dev)) |
960 | return PTR_ERR(dcssblk_root_dev); | 959 | return PTR_ERR(dcssblk_root_dev); |
961 | rc = device_create_file(dcssblk_root_dev, &dev_attr_add); | 960 | rc = device_create_file(dcssblk_root_dev, &dev_attr_add); |
962 | if (rc) { | 961 | if (rc) { |
963 | s390_root_dev_unregister(dcssblk_root_dev); | 962 | root_device_unregister(dcssblk_root_dev); |
964 | return rc; | 963 | return rc; |
965 | } | 964 | } |
966 | rc = device_create_file(dcssblk_root_dev, &dev_attr_remove); | 965 | rc = device_create_file(dcssblk_root_dev, &dev_attr_remove); |
967 | if (rc) { | 966 | if (rc) { |
968 | s390_root_dev_unregister(dcssblk_root_dev); | 967 | root_device_unregister(dcssblk_root_dev); |
969 | return rc; | 968 | return rc; |
970 | } | 969 | } |
971 | rc = register_blkdev(0, DCSSBLK_NAME); | 970 | rc = register_blkdev(0, DCSSBLK_NAME); |
972 | if (rc < 0) { | 971 | if (rc < 0) { |
973 | s390_root_dev_unregister(dcssblk_root_dev); | 972 | root_device_unregister(dcssblk_root_dev); |
974 | return rc; | 973 | return rc; |
975 | } | 974 | } |
976 | dcssblk_major = rc; | 975 | dcssblk_major = rc; |
diff --git a/drivers/s390/crypto/ap_bus.c b/drivers/s390/crypto/ap_bus.c index 1f5f5d2d87d9..9c148406b980 100644 --- a/drivers/s390/crypto/ap_bus.c +++ b/drivers/s390/crypto/ap_bus.c | |||
@@ -36,7 +36,6 @@ | |||
36 | #include <linux/notifier.h> | 36 | #include <linux/notifier.h> |
37 | #include <linux/kthread.h> | 37 | #include <linux/kthread.h> |
38 | #include <linux/mutex.h> | 38 | #include <linux/mutex.h> |
39 | #include <asm/s390_rdev.h> | ||
40 | #include <asm/reset.h> | 39 | #include <asm/reset.h> |
41 | #include <asm/airq.h> | 40 | #include <asm/airq.h> |
42 | #include <asm/atomic.h> | 41 | #include <asm/atomic.h> |
@@ -1522,7 +1521,7 @@ int __init ap_module_init(void) | |||
1522 | } | 1521 | } |
1523 | 1522 | ||
1524 | /* Create /sys/devices/ap. */ | 1523 | /* Create /sys/devices/ap. */ |
1525 | ap_root_device = s390_root_dev_register("ap"); | 1524 | ap_root_device = root_device_register("ap"); |
1526 | rc = IS_ERR(ap_root_device) ? PTR_ERR(ap_root_device) : 0; | 1525 | rc = IS_ERR(ap_root_device) ? PTR_ERR(ap_root_device) : 0; |
1527 | if (rc) | 1526 | if (rc) |
1528 | goto out_bus; | 1527 | goto out_bus; |
@@ -1565,7 +1564,7 @@ out_work: | |||
1565 | hrtimer_cancel(&ap_poll_timer); | 1564 | hrtimer_cancel(&ap_poll_timer); |
1566 | destroy_workqueue(ap_work_queue); | 1565 | destroy_workqueue(ap_work_queue); |
1567 | out_root: | 1566 | out_root: |
1568 | s390_root_dev_unregister(ap_root_device); | 1567 | root_device_unregister(ap_root_device); |
1569 | out_bus: | 1568 | out_bus: |
1570 | while (i--) | 1569 | while (i--) |
1571 | bus_remove_file(&ap_bus_type, ap_bus_attrs[i]); | 1570 | bus_remove_file(&ap_bus_type, ap_bus_attrs[i]); |
@@ -1600,7 +1599,7 @@ void ap_module_exit(void) | |||
1600 | hrtimer_cancel(&ap_poll_timer); | 1599 | hrtimer_cancel(&ap_poll_timer); |
1601 | destroy_workqueue(ap_work_queue); | 1600 | destroy_workqueue(ap_work_queue); |
1602 | tasklet_kill(&ap_tasklet); | 1601 | tasklet_kill(&ap_tasklet); |
1603 | s390_root_dev_unregister(ap_root_device); | 1602 | root_device_unregister(ap_root_device); |
1604 | while ((dev = bus_find_device(&ap_bus_type, NULL, NULL, | 1603 | while ((dev = bus_find_device(&ap_bus_type, NULL, NULL, |
1605 | __ap_match_all))) | 1604 | __ap_match_all))) |
1606 | { | 1605 | { |
diff --git a/drivers/s390/kvm/kvm_virtio.c b/drivers/s390/kvm/kvm_virtio.c index 28c90b89f2b4..cbc8566fab70 100644 --- a/drivers/s390/kvm/kvm_virtio.c +++ b/drivers/s390/kvm/kvm_virtio.c | |||
@@ -24,7 +24,6 @@ | |||
24 | #include <asm/kvm_virtio.h> | 24 | #include <asm/kvm_virtio.h> |
25 | #include <asm/setup.h> | 25 | #include <asm/setup.h> |
26 | #include <asm/s390_ext.h> | 26 | #include <asm/s390_ext.h> |
27 | #include <asm/s390_rdev.h> | ||
28 | 27 | ||
29 | #define VIRTIO_SUBCODE_64 0x0D00 | 28 | #define VIRTIO_SUBCODE_64 0x0D00 |
30 | 29 | ||
@@ -335,7 +334,7 @@ static int __init kvm_devices_init(void) | |||
335 | if (!MACHINE_IS_KVM) | 334 | if (!MACHINE_IS_KVM) |
336 | return -ENODEV; | 335 | return -ENODEV; |
337 | 336 | ||
338 | kvm_root = s390_root_dev_register("kvm_s390"); | 337 | kvm_root = root_device_register("kvm_s390"); |
339 | if (IS_ERR(kvm_root)) { | 338 | if (IS_ERR(kvm_root)) { |
340 | rc = PTR_ERR(kvm_root); | 339 | rc = PTR_ERR(kvm_root); |
341 | printk(KERN_ERR "Could not register kvm_s390 root device"); | 340 | printk(KERN_ERR "Could not register kvm_s390 root device"); |
@@ -344,7 +343,7 @@ static int __init kvm_devices_init(void) | |||
344 | 343 | ||
345 | rc = vmem_add_mapping(real_memory_size, PAGE_SIZE); | 344 | rc = vmem_add_mapping(real_memory_size, PAGE_SIZE); |
346 | if (rc) { | 345 | if (rc) { |
347 | s390_root_dev_unregister(kvm_root); | 346 | root_device_unregister(kvm_root); |
348 | return rc; | 347 | return rc; |
349 | } | 348 | } |
350 | 349 | ||
diff --git a/drivers/s390/net/cu3088.c b/drivers/s390/net/cu3088.c index f4a32375c037..48383459e99b 100644 --- a/drivers/s390/net/cu3088.c +++ b/drivers/s390/net/cu3088.c | |||
@@ -25,7 +25,6 @@ | |||
25 | #include <linux/module.h> | 25 | #include <linux/module.h> |
26 | #include <linux/err.h> | 26 | #include <linux/err.h> |
27 | 27 | ||
28 | #include <asm/s390_rdev.h> | ||
29 | #include <asm/ccwdev.h> | 28 | #include <asm/ccwdev.h> |
30 | #include <asm/ccwgroup.h> | 29 | #include <asm/ccwgroup.h> |
31 | 30 | ||
@@ -120,12 +119,12 @@ cu3088_init (void) | |||
120 | { | 119 | { |
121 | int rc; | 120 | int rc; |
122 | 121 | ||
123 | cu3088_root_dev = s390_root_dev_register("cu3088"); | 122 | cu3088_root_dev = root_device_register("cu3088"); |
124 | if (IS_ERR(cu3088_root_dev)) | 123 | if (IS_ERR(cu3088_root_dev)) |
125 | return PTR_ERR(cu3088_root_dev); | 124 | return PTR_ERR(cu3088_root_dev); |
126 | rc = ccw_driver_register(&cu3088_driver); | 125 | rc = ccw_driver_register(&cu3088_driver); |
127 | if (rc) | 126 | if (rc) |
128 | s390_root_dev_unregister(cu3088_root_dev); | 127 | root_device_unregister(cu3088_root_dev); |
129 | 128 | ||
130 | return rc; | 129 | return rc; |
131 | } | 130 | } |
@@ -134,7 +133,7 @@ static void __exit | |||
134 | cu3088_exit (void) | 133 | cu3088_exit (void) |
135 | { | 134 | { |
136 | ccw_driver_unregister(&cu3088_driver); | 135 | ccw_driver_unregister(&cu3088_driver); |
137 | s390_root_dev_unregister(cu3088_root_dev); | 136 | root_device_unregister(cu3088_root_dev); |
138 | } | 137 | } |
139 | 138 | ||
140 | MODULE_DEVICE_TABLE(ccw,cu3088_ids); | 139 | MODULE_DEVICE_TABLE(ccw,cu3088_ids); |
diff --git a/drivers/s390/net/qeth_core_main.c b/drivers/s390/net/qeth_core_main.c index 6811dd529f48..d1b5bebea7fb 100644 --- a/drivers/s390/net/qeth_core_main.c +++ b/drivers/s390/net/qeth_core_main.c | |||
@@ -24,7 +24,6 @@ | |||
24 | 24 | ||
25 | #include <asm/ebcdic.h> | 25 | #include <asm/ebcdic.h> |
26 | #include <asm/io.h> | 26 | #include <asm/io.h> |
27 | #include <asm/s390_rdev.h> | ||
28 | 27 | ||
29 | #include "qeth_core.h" | 28 | #include "qeth_core.h" |
30 | #include "qeth_core_offl.h" | 29 | #include "qeth_core_offl.h" |
@@ -4525,7 +4524,7 @@ static int __init qeth_core_init(void) | |||
4525 | &driver_attr_group); | 4524 | &driver_attr_group); |
4526 | if (rc) | 4525 | if (rc) |
4527 | goto driver_err; | 4526 | goto driver_err; |
4528 | qeth_core_root_dev = s390_root_dev_register("qeth"); | 4527 | qeth_core_root_dev = root_device_register("qeth"); |
4529 | rc = IS_ERR(qeth_core_root_dev) ? PTR_ERR(qeth_core_root_dev) : 0; | 4528 | rc = IS_ERR(qeth_core_root_dev) ? PTR_ERR(qeth_core_root_dev) : 0; |
4530 | if (rc) | 4529 | if (rc) |
4531 | goto register_err; | 4530 | goto register_err; |
@@ -4539,7 +4538,7 @@ static int __init qeth_core_init(void) | |||
4539 | 4538 | ||
4540 | return 0; | 4539 | return 0; |
4541 | slab_err: | 4540 | slab_err: |
4542 | s390_root_dev_unregister(qeth_core_root_dev); | 4541 | root_device_unregister(qeth_core_root_dev); |
4543 | register_err: | 4542 | register_err: |
4544 | driver_remove_file(&qeth_core_ccwgroup_driver.driver, | 4543 | driver_remove_file(&qeth_core_ccwgroup_driver.driver, |
4545 | &driver_attr_group); | 4544 | &driver_attr_group); |
@@ -4557,7 +4556,7 @@ out_err: | |||
4557 | 4556 | ||
4558 | static void __exit qeth_core_exit(void) | 4557 | static void __exit qeth_core_exit(void) |
4559 | { | 4558 | { |
4560 | s390_root_dev_unregister(qeth_core_root_dev); | 4559 | root_device_unregister(qeth_core_root_dev); |
4561 | driver_remove_file(&qeth_core_ccwgroup_driver.driver, | 4560 | driver_remove_file(&qeth_core_ccwgroup_driver.driver, |
4562 | &driver_attr_group); | 4561 | &driver_attr_group); |
4563 | ccwgroup_driver_unregister(&qeth_core_ccwgroup_driver); | 4562 | ccwgroup_driver_unregister(&qeth_core_ccwgroup_driver); |
diff --git a/drivers/s390/net/qeth_l2_main.c b/drivers/s390/net/qeth_l2_main.c index 21627ba3093b..591a2b3ae4cb 100644 --- a/drivers/s390/net/qeth_l2_main.c +++ b/drivers/s390/net/qeth_l2_main.c | |||
@@ -20,8 +20,6 @@ | |||
20 | #include <linux/mii.h> | 20 | #include <linux/mii.h> |
21 | #include <linux/ip.h> | 21 | #include <linux/ip.h> |
22 | 22 | ||
23 | #include <asm/s390_rdev.h> | ||
24 | |||
25 | #include "qeth_core.h" | 23 | #include "qeth_core.h" |
26 | #include "qeth_core_offl.h" | 24 | #include "qeth_core_offl.h" |
27 | 25 | ||
diff --git a/drivers/s390/net/qeth_l3_main.c b/drivers/s390/net/qeth_l3_main.c index cfda1ecffdf2..4693ee4e7b98 100644 --- a/drivers/s390/net/qeth_l3_main.c +++ b/drivers/s390/net/qeth_l3_main.c | |||
@@ -26,8 +26,6 @@ | |||
26 | #include <net/ip.h> | 26 | #include <net/ip.h> |
27 | #include <net/arp.h> | 27 | #include <net/arp.h> |
28 | 28 | ||
29 | #include <asm/s390_rdev.h> | ||
30 | |||
31 | #include "qeth_l3.h" | 29 | #include "qeth_l3.h" |
32 | #include "qeth_core_offl.h" | 30 | #include "qeth_core_offl.h" |
33 | 31 | ||
diff --git a/drivers/s390/s390_rdev.c b/drivers/s390/s390_rdev.c deleted file mode 100644 index 64371c05a3b3..000000000000 --- a/drivers/s390/s390_rdev.c +++ /dev/null | |||
@@ -1,51 +0,0 @@ | |||
1 | /* | ||
2 | * drivers/s390/s390_rdev.c | ||
3 | * s390 root device | ||
4 | * | ||
5 | * Copyright (C) 2002, 2005 IBM Deutschland Entwicklung GmbH, | ||
6 | * IBM Corporation | ||
7 | * Author(s): Cornelia Huck (cornelia.huck@de.ibm.com) | ||
8 | * Carsten Otte (cotte@de.ibm.com) | ||
9 | */ | ||
10 | |||
11 | #include <linux/slab.h> | ||
12 | #include <linux/err.h> | ||
13 | #include <linux/device.h> | ||
14 | #include <asm/s390_rdev.h> | ||
15 | |||
16 | static void | ||
17 | s390_root_dev_release(struct device *dev) | ||
18 | { | ||
19 | kfree(dev); | ||
20 | } | ||
21 | |||
22 | struct device * | ||
23 | s390_root_dev_register(const char *name) | ||
24 | { | ||
25 | struct device *dev; | ||
26 | int ret; | ||
27 | |||
28 | if (!strlen(name)) | ||
29 | return ERR_PTR(-EINVAL); | ||
30 | dev = kzalloc(sizeof(struct device), GFP_KERNEL); | ||
31 | if (!dev) | ||
32 | return ERR_PTR(-ENOMEM); | ||
33 | dev_set_name(dev, name); | ||
34 | dev->release = s390_root_dev_release; | ||
35 | ret = device_register(dev); | ||
36 | if (ret) { | ||
37 | kfree(dev); | ||
38 | return ERR_PTR(ret); | ||
39 | } | ||
40 | return dev; | ||
41 | } | ||
42 | |||
43 | void | ||
44 | s390_root_dev_unregister(struct device *dev) | ||
45 | { | ||
46 | if (dev) | ||
47 | device_unregister(dev); | ||
48 | } | ||
49 | |||
50 | EXPORT_SYMBOL(s390_root_dev_register); | ||
51 | EXPORT_SYMBOL(s390_root_dev_unregister); | ||