[S390] cio: Repair chpid event handling.
Passing the affected chpid in chp_event() worked only by
chance since chpid is the first element in res_acc_data.
Make it work properly by generalizing res_acc_data as
chp_link and always passing around a properly filled out
chp_link structure in chp_event().
Signed-off-by: Cornelia Huck <cornelia.huck@de.ibm.com>
Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
Signed-off-by: Heiko Carstens <heiko.carstens@de.ibm.com>
diff --git a/drivers/s390/cio/device.c b/drivers/s390/cio/device.c
index 67e7a31..522d47a 100644
--- a/drivers/s390/cio/device.c
+++ b/drivers/s390/cio/device.c
@@ -128,7 +128,8 @@
static int io_subchannel_remove(struct subchannel *);
static void io_subchannel_shutdown(struct subchannel *);
static int io_subchannel_sch_event(struct subchannel *, int);
-static int io_subchannel_chp_event(struct subchannel *, void *, int);
+static int io_subchannel_chp_event(struct subchannel *, struct chp_link *,
+ int);
static struct css_driver io_subchannel_driver = {
.owner = THIS_MODULE,
@@ -1329,14 +1330,12 @@
}
-static int io_subchannel_chp_event(struct subchannel *sch, void *data,
- int event)
+static int io_subchannel_chp_event(struct subchannel *sch,
+ struct chp_link *link, int event)
{
int mask;
- struct res_acc_data *res_data;
- res_data = data;
- mask = chp_ssd_get_mask(&sch->ssd_info, res_data);
+ mask = chp_ssd_get_mask(&sch->ssd_info, link);
if (!mask)
return 0;
switch (event) {