This commit was manufactured by cvs2svn to create branch 'vserver'.
[linux-2.6.git] / drivers / s390 / cio / schid.h
1 #ifndef S390_SCHID_H
2 #define S390_SCHID_H
3
4 struct subchannel_id {
5         __u32 reserved:13;
6         __u32 ssid:2;
7         __u32 one:1;
8         __u32 sch_no:16;
9 } __attribute__ ((packed,aligned(4)));
10
11
12 /* Helper function for sane state of pre-allocated subchannel_id. */
13 static inline void
14 init_subchannel_id(struct subchannel_id *schid)
15 {
16         memset(schid, 0, sizeof(struct subchannel_id));
17         schid->one = 1;
18 }
19
20 static inline int
21 schid_equal(struct subchannel_id *schid1, struct subchannel_id *schid2)
22 {
23         return !memcmp(schid1, schid2, sizeof(struct subchannel_id));
24 }
25
26 #endif /* S390_SCHID_H */