From 9368dac4367cd9a61ef75a745c6e26d0dd164172 Mon Sep 17 00:00:00 2001 From: Cornelia Huck Date: Wed, 30 May 2012 16:03:22 +0200 Subject: s390: Add a mechanism to get the subchannel id. This will be needed by the new virtio-ccw transport. Signed-off-by: Cornelia Huck Signed-off-by: Martin Schwidefsky --- drivers/s390/cio/device_ops.c | 12 ++++++++++++ 1 file changed, 12 insertions(+) (limited to 'drivers') 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) 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); -- cgit v1.2.3