~ubuntu-branches/ubuntu/maverick/linux-backports-modules-2.6.32/maverick

« back to all changes in this revision

Viewing changes to updates/alsa-driver/include/err_compat.h

  • Committer: Bazaar Package Importer
  • Author(s): Andy Whitcroft, Andy Whitcroft
  • Date: 2010-02-04 23:15:51 UTC
  • Revision ID: james.westby@ubuntu.com-20100204231551-vjz5pkvxclukjxm1
Tags: 2.6.32-12.1
[ Andy Whitcroft ]

* initial LBM for lucid
* drop generated files
* printchanges -- rebase tree does not have stable tags use changelog
* printenv -- add revisions to printenv output
* formally rename compat-wireless to linux-backports-modules-wireless
* Update to compat-wireless-2.6.33-rc5
* update nouveau to mainline 2.6.33-rc4
* add new LBM package for nouveau
* nouveau -- fix major numbers and proc entry names
* fix up firmware installs for -wireless
* clean up UPDATE-NOVEAU
* update Nouveau to v2.6.33-rc6

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
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 */