diff options
author | Cornelia Huck <cornelia.huck@de.ibm.com> | 2012-05-30 10:03:22 -0400 |
---|---|---|
committer | Martin Schwidefsky <schwidefsky@de.ibm.com> | 2012-11-23 05:14:28 -0500 |
commit | 9368dac4367cd9a61ef75a745c6e26d0dd164172 (patch) | |
tree | f44f86bc0579f86a2d6ccf4ae00fa05fc6b3a5cf /drivers/s390 | |
parent | 36eb2caa7bace31b7868a57f77cb148e58d1c9f9 (diff) |
s390: Add a mechanism to get the subchannel id.
This will be needed by the new virtio-ccw transport.
Signed-off-by: Cornelia Huck <cornelia.huck@de.ibm.com>
Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
Diffstat (limited to 'drivers/s390')
-rw-r--r-- | drivers/s390/cio/device_ops.c | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/drivers/s390/cio/device_ops.c b/drivers/s390/cio/device_ops.c index ec7fb6d3b479..2ad832f8e340 100644 --- a/drivers/s390/cio/device_ops.c +++ b/drivers/s390/cio/device_ops.c | |||
@@ -763,6 +763,18 @@ _ccw_device_get_subchannel_number(struct ccw_device *cdev) | |||
763 | return cdev->private->schid.sch_no; | 763 | return cdev->private->schid.sch_no; |
764 | } | 764 | } |
765 | 765 | ||
766 | /** | ||
767 | * ccw_device_get_schid - obtain a subchannel id | ||
768 | * @cdev: device to obtain the id for | ||
769 | * @schid: where to fill in the values | ||
770 | */ | ||
771 | void ccw_device_get_schid(struct ccw_device *cdev, struct subchannel_id *schid) | ||
772 | { | ||
773 | struct subchannel *sch = to_subchannel(cdev->dev.parent); | ||
774 | |||
775 | *schid = sch->schid; | ||
776 | } | ||
777 | EXPORT_SYMBOL_GPL(ccw_device_get_schid); | ||
766 | 778 | ||
767 | MODULE_LICENSE("GPL"); | 779 | MODULE_LICENSE("GPL"); |
768 | EXPORT_SYMBOL(ccw_device_set_options_mask); | 780 | EXPORT_SYMBOL(ccw_device_set_options_mask); |