Cornelia Huck | 9d92a7e | 2008-07-14 09:59:05 +0200 | [diff] [blame] | 1 | #ifndef ASM_SCHID_H |
| 2 | #define ASM_SCHID_H |
Cornelia Huck | a8237fc | 2006-01-06 00:19:21 -0800 | [diff] [blame] | 3 | |
Cornelia Huck | 1378ee9 | 2008-08-01 16:39:21 +0200 | [diff] [blame] | 4 | #include <linux/string.h> |
David Howells | 9807f75 | 2012-10-09 09:47:31 +0100 | [diff] [blame] | 5 | #include <uapi/asm/schid.h> |
Cornelia Huck | a8237fc | 2006-01-06 00:19:21 -0800 | [diff] [blame] | 6 | |
| 7 | /* Helper function for sane state of pre-allocated subchannel_id. */ |
| 8 | static inline void |
| 9 | init_subchannel_id(struct subchannel_id *schid) |
| 10 | { |
| 11 | memset(schid, 0, sizeof(struct subchannel_id)); |
| 12 | schid->one = 1; |
| 13 | } |
| 14 | |
| 15 | static inline int |
| 16 | schid_equal(struct subchannel_id *schid1, struct subchannel_id *schid2) |
| 17 | { |
| 18 | return !memcmp(schid1, schid2, sizeof(struct subchannel_id)); |
| 19 | } |
| 20 | |
Cornelia Huck | 9d92a7e | 2008-07-14 09:59:05 +0200 | [diff] [blame] | 21 | #endif /* ASM_SCHID_H */ |