Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

s390: remove s390_root_dev_*()

Replace s390_root_dev_register() with root_device_register() etc.

[Includes fix from Cornelia Huck]

Signed-off-by: Mark McLoughlin <markmc@redhat.com>
Cc: Cornelia Huck <cornelia.huck@de.ibm.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>

authored by

Mark McLoughlin and committed by
Greg Kroah-Hartman
035da16f ff8561c4

+20 -96
-15
arch/s390/include/asm/s390_rdev.h
··· 1 - /* 2 - * include/asm-s390/ccwdev.h 3 - * 4 - * Copyright (C) 2002,2005 IBM Deutschland Entwicklung GmbH, IBM Corporation 5 - * Author(s): Cornelia Huck <cornelia.huck@de.ibm.com> 6 - * Carsten Otte <cotte@de.ibm.com> 7 - * 8 - * Interface for s390 root device 9 - */ 10 - 11 - #ifndef _S390_RDEV_H_ 12 - #define _S390_RDEV_H_ 13 - extern struct device *s390_root_dev_register(const char *); 14 - extern void s390_root_dev_unregister(struct device *); 15 - #endif /* _S390_RDEV_H_ */
+1 -1
drivers/s390/Makefile
··· 4 4 5 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 8 obj-y += cio/ block/ char/ crypto/ net/ scsi/ kvm/ 9 9 10 10 drivers-y += drivers/s390/built-in.o
+5 -6
drivers/s390/block/dcssblk.c
··· 18 18 #include <asm/io.h> 19 19 #include <linux/completion.h> 20 20 #include <linux/interrupt.h> 21 - #include <asm/s390_rdev.h> 22 21 23 22 #define DCSSBLK_NAME "dcssblk" 24 23 #define DCSSBLK_MINORS_PER_DISK 1 ··· 945 946 static void __exit 946 947 dcssblk_exit(void) 947 948 { 948 - s390_root_dev_unregister(dcssblk_root_dev); 949 + root_device_unregister(dcssblk_root_dev); 949 950 unregister_blkdev(dcssblk_major, DCSSBLK_NAME); 950 951 } 951 952 ··· 954 955 { 955 956 int rc; 956 957 957 - dcssblk_root_dev = s390_root_dev_register("dcssblk"); 958 + dcssblk_root_dev = root_device_register("dcssblk"); 958 959 if (IS_ERR(dcssblk_root_dev)) 959 960 return PTR_ERR(dcssblk_root_dev); 960 961 rc = device_create_file(dcssblk_root_dev, &dev_attr_add); 961 962 if (rc) { 962 - s390_root_dev_unregister(dcssblk_root_dev); 963 + root_device_unregister(dcssblk_root_dev); 963 964 return rc; 964 965 } 965 966 rc = device_create_file(dcssblk_root_dev, &dev_attr_remove); 966 967 if (rc) { 967 - s390_root_dev_unregister(dcssblk_root_dev); 968 + root_device_unregister(dcssblk_root_dev); 968 969 return rc; 969 970 } 970 971 rc = register_blkdev(0, DCSSBLK_NAME); 971 972 if (rc < 0) { 972 - s390_root_dev_unregister(dcssblk_root_dev); 973 + root_device_unregister(dcssblk_root_dev); 973 974 return rc; 974 975 } 975 976 dcssblk_major = rc;
+3 -4
drivers/s390/crypto/ap_bus.c
··· 36 36 #include <linux/notifier.h> 37 37 #include <linux/kthread.h> 38 38 #include <linux/mutex.h> 39 - #include <asm/s390_rdev.h> 40 39 #include <asm/reset.h> 41 40 #include <asm/airq.h> 42 41 #include <asm/atomic.h> ··· 1521 1522 } 1522 1523 1523 1524 /* Create /sys/devices/ap. */ 1524 - ap_root_device = s390_root_dev_register("ap"); 1525 + ap_root_device = root_device_register("ap"); 1525 1526 rc = IS_ERR(ap_root_device) ? PTR_ERR(ap_root_device) : 0; 1526 1527 if (rc) 1527 1528 goto out_bus; ··· 1564 1565 hrtimer_cancel(&ap_poll_timer); 1565 1566 destroy_workqueue(ap_work_queue); 1566 1567 out_root: 1567 - s390_root_dev_unregister(ap_root_device); 1568 + root_device_unregister(ap_root_device); 1568 1569 out_bus: 1569 1570 while (i--) 1570 1571 bus_remove_file(&ap_bus_type, ap_bus_attrs[i]); ··· 1599 1600 hrtimer_cancel(&ap_poll_timer); 1600 1601 destroy_workqueue(ap_work_queue); 1601 1602 tasklet_kill(&ap_tasklet); 1602 - s390_root_dev_unregister(ap_root_device); 1603 + root_device_unregister(ap_root_device); 1603 1604 while ((dev = bus_find_device(&ap_bus_type, NULL, NULL, 1604 1605 __ap_match_all))) 1605 1606 {
+2 -3
drivers/s390/kvm/kvm_virtio.c
··· 24 24 #include <asm/kvm_virtio.h> 25 25 #include <asm/setup.h> 26 26 #include <asm/s390_ext.h> 27 - #include <asm/s390_rdev.h> 28 27 29 28 #define VIRTIO_SUBCODE_64 0x0D00 30 29 ··· 334 335 if (!MACHINE_IS_KVM) 335 336 return -ENODEV; 336 337 337 - kvm_root = s390_root_dev_register("kvm_s390"); 338 + kvm_root = root_device_register("kvm_s390"); 338 339 if (IS_ERR(kvm_root)) { 339 340 rc = PTR_ERR(kvm_root); 340 341 printk(KERN_ERR "Could not register kvm_s390 root device"); ··· 343 344 344 345 rc = vmem_add_mapping(real_memory_size, PAGE_SIZE); 345 346 if (rc) { 346 - s390_root_dev_unregister(kvm_root); 347 + root_device_unregister(kvm_root); 347 348 return rc; 348 349 } 349 350
+3 -4
drivers/s390/net/cu3088.c
··· 25 25 #include <linux/module.h> 26 26 #include <linux/err.h> 27 27 28 - #include <asm/s390_rdev.h> 29 28 #include <asm/ccwdev.h> 30 29 #include <asm/ccwgroup.h> 31 30 ··· 119 120 { 120 121 int rc; 121 122 122 - cu3088_root_dev = s390_root_dev_register("cu3088"); 123 + cu3088_root_dev = root_device_register("cu3088"); 123 124 if (IS_ERR(cu3088_root_dev)) 124 125 return PTR_ERR(cu3088_root_dev); 125 126 rc = ccw_driver_register(&cu3088_driver); 126 127 if (rc) 127 - s390_root_dev_unregister(cu3088_root_dev); 128 + root_device_unregister(cu3088_root_dev); 128 129 129 130 return rc; 130 131 } ··· 133 134 cu3088_exit (void) 134 135 { 135 136 ccw_driver_unregister(&cu3088_driver); 136 - s390_root_dev_unregister(cu3088_root_dev); 137 + root_device_unregister(cu3088_root_dev); 137 138 } 138 139 139 140 MODULE_DEVICE_TABLE(ccw,cu3088_ids);
+3 -4
drivers/s390/net/qeth_core_main.c
··· 24 24 25 25 #include <asm/ebcdic.h> 26 26 #include <asm/io.h> 27 - #include <asm/s390_rdev.h> 28 27 29 28 #include "qeth_core.h" 30 29 #include "qeth_core_offl.h" ··· 4524 4525 &driver_attr_group); 4525 4526 if (rc) 4526 4527 goto driver_err; 4527 - qeth_core_root_dev = s390_root_dev_register("qeth"); 4528 + qeth_core_root_dev = root_device_register("qeth"); 4528 4529 rc = IS_ERR(qeth_core_root_dev) ? PTR_ERR(qeth_core_root_dev) : 0; 4529 4530 if (rc) 4530 4531 goto register_err; ··· 4538 4539 4539 4540 return 0; 4540 4541 slab_err: 4541 - s390_root_dev_unregister(qeth_core_root_dev); 4542 + root_device_unregister(qeth_core_root_dev); 4542 4543 register_err: 4543 4544 driver_remove_file(&qeth_core_ccwgroup_driver.driver, 4544 4545 &driver_attr_group); ··· 4556 4557 4557 4558 static void __exit qeth_core_exit(void) 4558 4559 { 4559 - s390_root_dev_unregister(qeth_core_root_dev); 4560 + root_device_unregister(qeth_core_root_dev); 4560 4561 driver_remove_file(&qeth_core_ccwgroup_driver.driver, 4561 4562 &driver_attr_group); 4562 4563 ccwgroup_driver_unregister(&qeth_core_ccwgroup_driver);
-2
drivers/s390/net/qeth_l2_main.c
··· 20 20 #include <linux/mii.h> 21 21 #include <linux/ip.h> 22 22 23 - #include <asm/s390_rdev.h> 24 - 25 23 #include "qeth_core.h" 26 24 #include "qeth_core_offl.h" 27 25
-2
drivers/s390/net/qeth_l3_main.c
··· 26 26 #include <net/ip.h> 27 27 #include <net/arp.h> 28 28 29 - #include <asm/s390_rdev.h> 30 - 31 29 #include "qeth_l3.h" 32 30 #include "qeth_core_offl.h" 33 31
-51
drivers/s390/s390_rdev.c
··· 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);
+3 -4
net/iucv/iucv.c
··· 50 50 #include <asm/ebcdic.h> 51 51 #include <asm/io.h> 52 52 #include <asm/s390_ext.h> 53 - #include <asm/s390_rdev.h> 54 53 #include <asm/smp.h> 55 54 56 55 /* ··· 1695 1696 rc = register_external_interrupt(0x4000, iucv_external_interrupt); 1696 1697 if (rc) 1697 1698 goto out; 1698 - iucv_root = s390_root_dev_register("iucv"); 1699 + iucv_root = root_device_register("iucv"); 1699 1700 if (IS_ERR(iucv_root)) { 1700 1701 rc = PTR_ERR(iucv_root); 1701 1702 goto out_int; ··· 1739 1740 kfree(iucv_irq_data[cpu]); 1740 1741 iucv_irq_data[cpu] = NULL; 1741 1742 } 1742 - s390_root_dev_unregister(iucv_root); 1743 + root_device_unregister(iucv_root); 1743 1744 out_int: 1744 1745 unregister_external_interrupt(0x4000, iucv_external_interrupt); 1745 1746 out: ··· 1769 1770 kfree(iucv_irq_data[cpu]); 1770 1771 iucv_irq_data[cpu] = NULL; 1771 1772 } 1772 - s390_root_dev_unregister(iucv_root); 1773 + root_device_unregister(iucv_root); 1773 1774 bus_unregister(&iucv_bus); 1774 1775 unregister_external_interrupt(0x4000, iucv_external_interrupt); 1775 1776 }