aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/s390/cio
diff options
context:
space:
mode:
authorSebastian Ott <sebott@linux.vnet.ibm.com>2012-11-22 15:56:39 +0100
committerMartin Schwidefsky <schwidefsky@de.ibm.com>2012-11-23 11:14:35 +0100
commit683c3dcef439f969b2c7fd09b60144cb4e2155a5 (patch)
tree9c83a5059e930bc9aa81e3c96b997020e6f7713c /drivers/s390/cio
parentcff971026d7c19f67f9312e753bb06f18b6cdae7 (diff)
downloadkernel_goldelico_gta04-683c3dcef439f969b2c7fd09b60144cb4e2155a5.zip
kernel_goldelico_gta04-683c3dcef439f969b2c7fd09b60144cb4e2155a5.tar.gz
kernel_goldelico_gta04-683c3dcef439f969b2c7fd09b60144cb4e2155a5.tar.bz2
s390/ccwgroup: allow drivers to call set_{on,off}line
Allow drivers to enable/disable ccwgroup devices. Acked-by: Peter Oberparleiter <peter.oberparleiter@de.ibm.com> Signed-off-by: Sebastian Ott <sebott@linux.vnet.ibm.com> Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
Diffstat (limited to 'drivers/s390/cio')
-rw-r--r--drivers/s390/cio/ccwgroup.c22
1 files changed, 20 insertions, 2 deletions
diff --git a/drivers/s390/cio/ccwgroup.c b/drivers/s390/cio/ccwgroup.c
index 9c8e117..84846c2 100644
--- a/drivers/s390/cio/ccwgroup.c
+++ b/drivers/s390/cio/ccwgroup.c
@@ -65,7 +65,15 @@ static void __ccwgroup_remove_cdev_refs(struct ccwgroup_device *gdev)
}
}
-static int ccwgroup_set_online(struct ccwgroup_device *gdev)
+/**
+ * ccwgroup_set_online() - enable a ccwgroup device
+ * @gdev: target ccwgroup device
+ *
+ * This function attempts to put the ccwgroup device into the online state.
+ * Returns:
+ * %0 on success and a negative error value on failure.
+ */
+int ccwgroup_set_online(struct ccwgroup_device *gdev)
{
struct ccwgroup_driver *gdrv = to_ccwgroupdrv(gdev->dev.driver);
int ret = -EINVAL;
@@ -84,8 +92,17 @@ out:
atomic_set(&gdev->onoff, 0);
return ret;
}
+EXPORT_SYMBOL(ccwgroup_set_online);
-static int ccwgroup_set_offline(struct ccwgroup_device *gdev)
+/**
+ * ccwgroup_set_offline() - disable a ccwgroup device
+ * @gdev: target ccwgroup device
+ *
+ * This function attempts to put the ccwgroup device into the offline state.
+ * Returns:
+ * %0 on success and a negative error value on failure.
+ */
+int ccwgroup_set_offline(struct ccwgroup_device *gdev)
{
struct ccwgroup_driver *gdrv = to_ccwgroupdrv(gdev->dev.driver);
int ret = -EINVAL;
@@ -104,6 +121,7 @@ out:
atomic_set(&gdev->onoff, 0);
return ret;
}
+EXPORT_SYMBOL(ccwgroup_set_offline);
static ssize_t ccwgroup_online_store(struct device *dev,
struct device_attribute *attr,