summaryrefslogtreecommitdiff
path: root/drivers/s390
diff options
context:
space:
mode:
authorSebastian Ott <sebott@linux.vnet.ibm.com>2017-02-15 13:45:07 +0300
committerMartin Schwidefsky <schwidefsky@de.ibm.com>2018-05-23 09:06:58 +0300
commita166c368e7dbc84a5d8f013d9fda99f47f9c9f13 (patch)
treec6e16d75453221b62407f766f98120e2d4a28daf /drivers/s390
parent199652309a4d6635fca19d7528d73ab9e219bd9a (diff)
downloadlinux-a166c368e7dbc84a5d8f013d9fda99f47f9c9f13.tar.xz
s390/cio: add test for ccwgroup device
Add a test to check if a given device is a ccwgroup device. Signed-off-by: Sebastian Ott <sebott@linux.vnet.ibm.com> Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
Diffstat (limited to 'drivers/s390')
-rw-r--r--drivers/s390/cio/ccwgroup.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/drivers/s390/cio/ccwgroup.c b/drivers/s390/cio/ccwgroup.c
index 5535312602af..db9c854088bc 100644
--- a/drivers/s390/cio/ccwgroup.c
+++ b/drivers/s390/cio/ccwgroup.c
@@ -561,6 +561,12 @@ static struct bus_type ccwgroup_bus_type = {
.pm = &ccwgroup_pm_ops,
};
+bool dev_is_ccwgroup(struct device *dev)
+{
+ return dev->bus == &ccwgroup_bus_type;
+}
+EXPORT_SYMBOL(dev_is_ccwgroup);
+
/**
* ccwgroup_driver_register() - register a ccw group driver
* @cdriver: driver to be registered