blob: 40b47dfa9d66d4859ada7a44806484bef5561d89 [file] [log] [blame]
Cornelia Huck9d92a7e2008-07-14 09:59:05 +02001#ifndef ASM_SCHID_H
2#define ASM_SCHID_H
Cornelia Hucka8237fc2006-01-06 00:19:21 -08003
Cornelia Huck1378ee92008-08-01 16:39:21 +02004#include <linux/string.h>
David Howells9807f752012-10-09 09:47:31 +01005#include <uapi/asm/schid.h>
Cornelia Hucka8237fc2006-01-06 00:19:21 -08006
7/* Helper function for sane state of pre-allocated subchannel_id. */
8static inline void
9init_subchannel_id(struct subchannel_id *schid)
10{
11 memset(schid, 0, sizeof(struct subchannel_id));
12 schid->one = 1;
13}
14
15static inline int
16schid_equal(struct subchannel_id *schid1, struct subchannel_id *schid2)
17{
18 return !memcmp(schid1, schid2, sizeof(struct subchannel_id));
19}
20
Cornelia Huck9d92a7e2008-07-14 09:59:05 +020021#endif /* ASM_SCHID_H */