aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/s390/cio/device.c
diff options
context:
space:
mode:
authorCornelia Huck <cornelia.huck@de.ibm.com>2008-01-26 08:10:39 -0500
committerMartin Schwidefsky <schwidefsky@de.ibm.com>2008-01-26 08:10:57 -0500
commit602b20f2bf335d0d5fce11cb2ade22aa74e7ba25 (patch)
tree2fdbeca6df1c7c5f1dad9c8f70c128c42a2621d5 /drivers/s390/cio/device.c
parent084325d80418adf4d75b10a9ceff1348f2e09163 (diff)
[S390] cio: css_driver: Use consistent parameters.
Make all callbacks in css_driver take a struct subchannel (and not a struct device). Signed-off-by: Cornelia Huck <cornelia.huck@de.ibm.com> Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
Diffstat (limited to 'drivers/s390/cio/device.c')
-rw-r--r--drivers/s390/cio/device.c38
1 files changed, 24 insertions, 14 deletions
diff --git a/drivers/s390/cio/device.c b/drivers/s390/cio/device.c
index 74f6b539974a..000c64129ed8 100644
--- a/drivers/s390/cio/device.c
+++ b/drivers/s390/cio/device.c
@@ -115,11 +115,12 @@ static int ccw_uevent(struct device *dev, struct kobj_uevent_env *env)
115 115
116struct bus_type ccw_bus_type; 116struct bus_type ccw_bus_type;
117 117
118static int io_subchannel_probe (struct subchannel *); 118static void io_subchannel_irq(struct subchannel *);
119static int io_subchannel_remove (struct subchannel *); 119static int io_subchannel_probe(struct subchannel *);
120static int io_subchannel_notify(struct device *, int); 120static int io_subchannel_remove(struct subchannel *);
121static void io_subchannel_verify(struct device *); 121static int io_subchannel_notify(struct subchannel *, int);
122static void io_subchannel_ioterm(struct device *); 122static void io_subchannel_verify(struct subchannel *);
123static void io_subchannel_ioterm(struct subchannel *);
123static void io_subchannel_shutdown(struct subchannel *); 124static void io_subchannel_shutdown(struct subchannel *);
124 125
125static struct css_driver io_subchannel_driver = { 126static struct css_driver io_subchannel_driver = {
@@ -1096,6 +1097,18 @@ out:
1096 put_device(&cdev->dev); 1097 put_device(&cdev->dev);
1097} 1098}
1098 1099
1100static void io_subchannel_irq(struct subchannel *sch)
1101{
1102 struct ccw_device *cdev;
1103
1104 cdev = sch->dev.driver_data;
1105
1106 CIO_TRACE_EVENT(3, "IRQ");
1107 CIO_TRACE_EVENT(3, sch->dev.bus_id);
1108 if (cdev)
1109 dev_fsm_event(cdev, DEV_EVENT_INTERRUPT);
1110}
1111
1099static int 1112static int
1100io_subchannel_probe (struct subchannel *sch) 1113io_subchannel_probe (struct subchannel *sch)
1101{ 1114{
@@ -1183,12 +1196,11 @@ io_subchannel_remove (struct subchannel *sch)
1183 return 0; 1196 return 0;
1184} 1197}
1185 1198
1186static int 1199static int io_subchannel_notify(struct subchannel *sch, int event)
1187io_subchannel_notify(struct device *dev, int event)
1188{ 1200{
1189 struct ccw_device *cdev; 1201 struct ccw_device *cdev;
1190 1202
1191 cdev = dev->driver_data; 1203 cdev = sch->dev.driver_data;
1192 if (!cdev) 1204 if (!cdev)
1193 return 0; 1205 return 0;
1194 if (!cdev->drv) 1206 if (!cdev->drv)
@@ -1198,22 +1210,20 @@ io_subchannel_notify(struct device *dev, int event)
1198 return cdev->drv->notify ? cdev->drv->notify(cdev, event) : 0; 1210 return cdev->drv->notify ? cdev->drv->notify(cdev, event) : 0;
1199} 1211}
1200 1212
1201static void 1213static void io_subchannel_verify(struct subchannel *sch)
1202io_subchannel_verify(struct device *dev)
1203{ 1214{
1204 struct ccw_device *cdev; 1215 struct ccw_device *cdev;
1205 1216
1206 cdev = dev->driver_data; 1217 cdev = sch->dev.driver_data;
1207 if (cdev) 1218 if (cdev)
1208 dev_fsm_event(cdev, DEV_EVENT_VERIFY); 1219 dev_fsm_event(cdev, DEV_EVENT_VERIFY);
1209} 1220}
1210 1221
1211static void 1222static void io_subchannel_ioterm(struct subchannel *sch)
1212io_subchannel_ioterm(struct device *dev)
1213{ 1223{
1214 struct ccw_device *cdev; 1224 struct ccw_device *cdev;
1215 1225
1216 cdev = dev->driver_data; 1226 cdev = sch->dev.driver_data;
1217 if (!cdev) 1227 if (!cdev)
1218 return; 1228 return;
1219 /* Internal I/O will be retried by the interrupt handler. */ 1229 /* Internal I/O will be retried by the interrupt handler. */