aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/s390/cio/device.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/s390/cio/device.c')
-rw-r--r--drivers/s390/cio/device.c33
1 files changed, 14 insertions, 19 deletions
diff --git a/drivers/s390/cio/device.c b/drivers/s390/cio/device.c
index 67f0de6aed33..646da5640401 100644
--- a/drivers/s390/cio/device.c
+++ b/drivers/s390/cio/device.c
@@ -100,7 +100,7 @@ ccw_uevent (struct device *dev, char **envp, int num_envp,
100 if ((buffer_size - length <= 0) || (i >= num_envp)) 100 if ((buffer_size - length <= 0) || (i >= num_envp))
101 return -ENOMEM; 101 return -ENOMEM;
102 102
103 envp[i] = 0; 103 envp[i] = NULL;
104 104
105 return 0; 105 return 0;
106} 106}
@@ -280,7 +280,7 @@ ccw_device_remove_disconnected(struct ccw_device *cdev)
280 * 'throw away device'. 280 * 'throw away device'.
281 */ 281 */
282 sch = to_subchannel(cdev->dev.parent); 282 sch = to_subchannel(cdev->dev.parent);
283 device_unregister(&sch->dev); 283 css_sch_device_unregister(sch);
284 /* Reset intparm to zeroes. */ 284 /* Reset intparm to zeroes. */
285 sch->schib.pmcw.intparm = 0; 285 sch->schib.pmcw.intparm = 0;
286 cio_modify(sch); 286 cio_modify(sch);
@@ -556,12 +556,11 @@ get_disc_ccwdev_by_devno(unsigned int devno, unsigned int ssid,
556 struct ccw_device *sibling) 556 struct ccw_device *sibling)
557{ 557{
558 struct device *dev; 558 struct device *dev;
559 struct match_data data = { 559 struct match_data data;
560 .devno = devno,
561 .ssid = ssid,
562 .sibling = sibling,
563 };
564 560
561 data.devno = devno;
562 data.ssid = ssid;
563 data.sibling = sibling;
565 dev = bus_find_device(&ccw_bus_type, NULL, &data, match_devno); 564 dev = bus_find_device(&ccw_bus_type, NULL, &data, match_devno);
566 565
567 return dev ? to_ccwdev(dev) : NULL; 566 return dev ? to_ccwdev(dev) : NULL;
@@ -625,7 +624,7 @@ ccw_device_do_unreg_rereg(void *data)
625 other_sch->schib.pmcw.intparm = 0; 624 other_sch->schib.pmcw.intparm = 0;
626 cio_modify(other_sch); 625 cio_modify(other_sch);
627 } 626 }
628 device_unregister(&other_sch->dev); 627 css_sch_device_unregister(other_sch);
629 } 628 }
630 } 629 }
631 /* Update ssd info here. */ 630 /* Update ssd info here. */
@@ -709,7 +708,7 @@ ccw_device_call_sch_unregister(void *data)
709 struct subchannel *sch; 708 struct subchannel *sch;
710 709
711 sch = to_subchannel(cdev->dev.parent); 710 sch = to_subchannel(cdev->dev.parent);
712 device_unregister(&sch->dev); 711 css_sch_device_unregister(sch);
713 /* Reset intparm to zeroes. */ 712 /* Reset intparm to zeroes. */
714 sch->schib.pmcw.intparm = 0; 713 sch->schib.pmcw.intparm = 0;
715 cio_modify(sch); 714 cio_modify(sch);
@@ -835,10 +834,8 @@ io_subchannel_probe (struct subchannel *sch)
835 return -ENOMEM; 834 return -ENOMEM;
836 } 835 }
837 atomic_set(&cdev->private->onoff, 0); 836 atomic_set(&cdev->private->onoff, 0);
838 cdev->dev = (struct device) { 837 cdev->dev.parent = &sch->dev;
839 .parent = &sch->dev, 838 cdev->dev.release = ccw_device_release;
840 .release = ccw_device_release,
841 };
842 INIT_LIST_HEAD(&cdev->private->kick_work.entry); 839 INIT_LIST_HEAD(&cdev->private->kick_work.entry);
843 /* Do first half of device_register. */ 840 /* Do first half of device_register. */
844 device_initialize(&cdev->dev); 841 device_initialize(&cdev->dev);
@@ -977,9 +974,7 @@ ccw_device_console_enable (struct ccw_device *cdev, struct subchannel *sch)
977 int rc; 974 int rc;
978 975
979 /* Initialize the ccw_device structure. */ 976 /* Initialize the ccw_device structure. */
980 cdev->dev = (struct device) { 977 cdev->dev.parent= &sch->dev;
981 .parent = &sch->dev,
982 };
983 rc = io_subchannel_recog(cdev, sch); 978 rc = io_subchannel_recog(cdev, sch);
984 if (rc) 979 if (rc)
985 return rc; 980 return rc;
@@ -1057,7 +1052,7 @@ get_ccwdev_by_busid(struct ccw_driver *cdrv, const char *bus_id)
1057 __ccwdev_check_busid); 1052 __ccwdev_check_busid);
1058 put_driver(drv); 1053 put_driver(drv);
1059 1054
1060 return dev ? to_ccwdev(dev) : 0; 1055 return dev ? to_ccwdev(dev) : NULL;
1061} 1056}
1062 1057
1063/************************** device driver handling ************************/ 1058/************************** device driver handling ************************/
@@ -1082,7 +1077,7 @@ ccw_device_probe (struct device *dev)
1082 ret = cdrv->probe ? cdrv->probe(cdev) : -ENODEV; 1077 ret = cdrv->probe ? cdrv->probe(cdev) : -ENODEV;
1083 1078
1084 if (ret) { 1079 if (ret) {
1085 cdev->drv = 0; 1080 cdev->drv = NULL;
1086 return ret; 1081 return ret;
1087 } 1082 }
1088 1083
@@ -1113,7 +1108,7 @@ ccw_device_remove (struct device *dev)
1113 ret, cdev->dev.bus_id); 1108 ret, cdev->dev.bus_id);
1114 } 1109 }
1115 ccw_device_set_timeout(cdev, 0); 1110 ccw_device_set_timeout(cdev, 0);
1116 cdev->drv = 0; 1111 cdev->drv = NULL;
1117 return 0; 1112 return 0;
1118} 1113}
1119 1114