diff options
author | Sebastian Ott | 2017-02-15 11:45:07 +0100 |
---|---|---|
committer | Martin Schwidefsky | 2018-05-23 08:06:58 +0200 |
commit | a166c368e7dbc84a5d8f013d9fda99f47f9c9f13 (patch) | |
tree | c6e16d75453221b62407f766f98120e2d4a28daf /arch/s390 | |
parent | 199652309a4d6635fca19d7528d73ab9e219bd9a (diff) |
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 'arch/s390')
-rw-r--r-- | arch/s390/include/asm/ccwgroup.h | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/arch/s390/include/asm/ccwgroup.h b/arch/s390/include/asm/ccwgroup.h index 99aa817dad32..860cab7479c3 100644 --- a/arch/s390/include/asm/ccwgroup.h +++ b/arch/s390/include/asm/ccwgroup.h @@ -73,4 +73,14 @@ extern void ccwgroup_remove_ccwdev(struct ccw_device *cdev); #define to_ccwgroupdev(x) container_of((x), struct ccwgroup_device, dev) #define to_ccwgroupdrv(x) container_of((x), struct ccwgroup_driver, driver) + +#if IS_ENABLED(CONFIG_CCWGROUP) +bool dev_is_ccwgroup(struct device *dev); +#else /* CONFIG_CCWGROUP */ +static inline bool dev_is_ccwgroup(struct device *dev) +{ + return false; +} +#endif /* CONFIG_CCWGROUP */ + #endif |