Last change
on this file since 521 was 305, checked in by Paul Smedley, 17 years ago |
Update source to ALSA 1.0.16 level
|
File size:
484 bytes
|
Line | |
---|
1 | #ifndef _LINUX_ERR_H
|
---|
2 | #define _LINUX_ERR_H
|
---|
3 |
|
---|
4 | /* on earlier kernels, adriver.h already gets this through linux/fs.h */
|
---|
5 | #if LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 0)
|
---|
6 |
|
---|
7 | #define IS_ERR_VALUE(x) ((x) > (unsigned long)-1000L)
|
---|
8 |
|
---|
9 | static inline void *ERR_PTR(long error)
|
---|
10 | {
|
---|
11 | return (void *) error;
|
---|
12 | }
|
---|
13 |
|
---|
14 | static inline long PTR_ERR(const void *ptr)
|
---|
15 | {
|
---|
16 | return (long) ptr;
|
---|
17 | }
|
---|
18 |
|
---|
19 | static inline long IS_ERR(const void *ptr)
|
---|
20 | {
|
---|
21 | return IS_ERR_VALUE((unsigned long)ptr);
|
---|
22 | }
|
---|
23 |
|
---|
24 | #endif
|
---|
25 |
|
---|
26 | #endif /* _LINUX_ERR_H */
|
---|
Note:
See
TracBrowser
for help on using the repository browser.