aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/s390/cio/idset.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/s390/cio/idset.c')
-rw-r--r--drivers/s390/cio/idset.c10
1 files changed, 10 insertions, 0 deletions
diff --git a/drivers/s390/cio/idset.c b/drivers/s390/cio/idset.c
index cf8f24a4b5eb..77e42cb127bb 100644
--- a/drivers/s390/cio/idset.c
+++ b/drivers/s390/cio/idset.c
@@ -110,3 +110,13 @@ int idset_sch_get_first(struct idset *set, struct subchannel_id *schid)
110 } 110 }
111 return rc; 111 return rc;
112} 112}
113
114int idset_is_empty(struct idset *set)
115{
116 int bitnum;
117
118 bitnum = find_first_bit(set->bitmap, set->num_ssid * set->num_id);
119 if (bitnum >= set->num_ssid * set->num_id)
120 return 1;
121 return 0;
122}