[PATCH] s390: introduce struct subchannel_id
[usb.git] / drivers / s390 / cio / schid.h
blob220d978823411f628cc44150287159583c51e67f
1 #ifndef S390_SCHID_H
2 #define S390_SCHID_H
4 struct subchannel_id {
5 __u32 reserved:15;
6 __u32 one:1;
7 __u32 sch_no:16;
8 } __attribute__ ((packed,aligned(4)));
11 /* Helper function for sane state of pre-allocated subchannel_id. */
12 static inline void
13 init_subchannel_id(struct subchannel_id *schid)
15 memset(schid, 0, sizeof(struct subchannel_id));
16 schid->one = 1;
19 static inline int
20 schid_equal(struct subchannel_id *schid1, struct subchannel_id *schid2)
22 return !memcmp(schid1, schid2, sizeof(struct subchannel_id));
25 #endif /* S390_SCHID_H */