diff options
author | Cornelia Huck <cornelia.huck@de.ibm.com> | 2008-01-26 08:10:39 -0500 |
---|---|---|
committer | Martin Schwidefsky <schwidefsky@de.ibm.com> | 2008-01-26 08:10:57 -0500 |
commit | 602b20f2bf335d0d5fce11cb2ade22aa74e7ba25 (patch) | |
tree | 2fdbeca6df1c7c5f1dad9c8f70c128c42a2621d5 /drivers/s390/cio/device.c | |
parent | 084325d80418adf4d75b10a9ceff1348f2e09163 (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.c | 38 |
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 | ||
116 | struct bus_type ccw_bus_type; | 116 | struct bus_type ccw_bus_type; |
117 | 117 | ||
118 | static int io_subchannel_probe (struct subchannel *); | 118 | static void io_subchannel_irq(struct subchannel *); |
119 | static int io_subchannel_remove (struct subchannel *); | 119 | static int io_subchannel_probe(struct subchannel *); |
120 | static int io_subchannel_notify(struct device *, int); | 120 | static int io_subchannel_remove(struct subchannel *); |
121 | static void io_subchannel_verify(struct device *); | 121 | static int io_subchannel_notify(struct subchannel *, int); |
122 | static void io_subchannel_ioterm(struct device *); | 122 | static void io_subchannel_verify(struct subchannel *); |
123 | static void io_subchannel_ioterm(struct subchannel *); | ||
123 | static void io_subchannel_shutdown(struct subchannel *); | 124 | static void io_subchannel_shutdown(struct subchannel *); |
124 | 125 | ||
125 | static struct css_driver io_subchannel_driver = { | 126 | static 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 | ||
1100 | static 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 | |||
1099 | static int | 1112 | static int |
1100 | io_subchannel_probe (struct subchannel *sch) | 1113 | io_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 | ||
1186 | static int | 1199 | static int io_subchannel_notify(struct subchannel *sch, int event) |
1187 | io_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 | ||
1201 | static void | 1213 | static void io_subchannel_verify(struct subchannel *sch) |
1202 | io_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 | ||
1211 | static void | 1222 | static void io_subchannel_ioterm(struct subchannel *sch) |
1212 | io_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. */ |