From b3945b18b5038b27a563a3208340373346ccbec8 Mon Sep 17 00:00:00 2001 From: Cornelia Huck Date: Wed, 30 May 2012 16:03:22 +0200 Subject: [PATCH] --- yaml --- r: 343383 b: refs/heads/master c: 9368dac4367cd9a61ef75a745c6e26d0dd164172 h: refs/heads/master i: 343381: b51dc5954e80c97164142b7495d1213b4b269bc4 343379: 3b6c7fb637b1467482885fba3252cfd59ce17176 343375: f62f9cc785aa55ce392bd1f4f9520c6aa57fa27e v: v3 --- [refs] | 2 +- trunk/arch/s390/include/asm/ccwdev.h | 5 +++++ trunk/drivers/s390/cio/device_ops.c | 12 ++++++++++++ 3 files changed, 18 insertions(+), 1 deletion(-) diff --git a/[refs] b/[refs] index ae2f2a1f86ca..07a0c5d666b6 100644 --- a/[refs] +++ b/[refs] @@ -1,2 +1,2 @@ --- -refs/heads/master: 36eb2caa7bace31b7868a57f77cb148e58d1c9f9 +refs/heads/master: 9368dac4367cd9a61ef75a745c6e26d0dd164172 diff --git a/trunk/arch/s390/include/asm/ccwdev.h b/trunk/arch/s390/include/asm/ccwdev.h index 1cb4bb3f32d9..9ad79f7f1acc 100644 --- a/trunk/arch/s390/include/asm/ccwdev.h +++ b/trunk/arch/s390/include/asm/ccwdev.h @@ -18,6 +18,9 @@ struct irb; struct ccw1; struct ccw_dev_id; +/* from asm/schid.h */ +struct subchannel_id; + /* simplified initializers for struct ccw_device: * CCW_DEVICE and CCW_DEVICE_DEVTYPE initialize one * entry in your MODULE_DEVICE_TABLE and set the match_flag correctly */ @@ -226,5 +229,7 @@ int ccw_device_siosl(struct ccw_device *); // FIXME: these have to go extern int _ccw_device_get_subchannel_number(struct ccw_device *); +extern void ccw_device_get_schid(struct ccw_device *, struct subchannel_id *); + extern void *ccw_device_get_chp_desc(struct ccw_device *, int); #endif /* _S390_CCWDEV_H_ */ diff --git a/trunk/drivers/s390/cio/device_ops.c b/trunk/drivers/s390/cio/device_ops.c index ec7fb6d3b479..2ad832f8e340 100644 --- a/trunk/drivers/s390/cio/device_ops.c +++ b/trunk/drivers/s390/cio/device_ops.c @@ -763,6 +763,18 @@ _ccw_device_get_subchannel_number(struct ccw_device *cdev) return cdev->private->schid.sch_no; } +/** + * ccw_device_get_schid - obtain a subchannel id + * @cdev: device to obtain the id for + * @schid: where to fill in the values + */ +void ccw_device_get_schid(struct ccw_device *cdev, struct subchannel_id *schid) +{ + struct subchannel *sch = to_subchannel(cdev->dev.parent); + + *schid = sch->schid; +} +EXPORT_SYMBOL_GPL(ccw_device_get_schid); MODULE_LICENSE("GPL"); EXPORT_SYMBOL(ccw_device_set_options_mask);