diff options
author | Michael Buesch <mb@bu3sch.de> | 2009-05-11 00:21:14 +0200 |
---|---|---|
committer | Ben Skeggs <bskeggs@redhat.com> | 2009-05-28 17:26:37 +1000 |
commit | 651e3dc6dd58a79c90db7513ee2fb28360a4560d (patch) | |
tree | 54847b5fc4bc81ca56acb2af04ab728c1bda401f /linux-core/drm_os_linux.h | |
parent | c65a343ed29c24f812ca919f40dfeee948b6f14a (diff) |
drm: Fix compilation on 2.6.30
This fixes DRM compilation of nouveau.ko on kernel 2.6.30.
Signed-off-by: Michael Buesch <mb@bu3sch.de>
Diffstat (limited to 'linux-core/drm_os_linux.h')
-rw-r--r-- | linux-core/drm_os_linux.h | 19 |
1 files changed, 18 insertions, 1 deletions
diff --git a/linux-core/drm_os_linux.h b/linux-core/drm_os_linux.h index f58296b7..be5e0991 100644 --- a/linux-core/drm_os_linux.h +++ b/linux-core/drm_os_linux.h @@ -32,12 +32,29 @@ /** IRQ handler arguments and return type and values */ #define DRM_IRQ_ARGS int irq, void *arg /** backwards compatibility with old irq return values */ -#ifndef IRQ_HANDLED +#if !defined(IRQ_HANDLED) && LINUX_VERSION_CODE <= KERNEL_VERSION(2,6,29) typedef void irqreturn_t; #define IRQ_HANDLED /* nothing */ #define IRQ_NONE /* nothing */ #endif +#if LINUX_VERSION_CODE <= KERNEL_VERSION(2,6,25) +static inline const char *dev_name(const struct device *dev) +{ + return dev->bus_id; +} +static inline int dev_set_name(struct device *dev, const char *name, ...) +{ + va_list vargs; + + va_start(vargs, name); + vsnprintf(dev->bus_id, sizeof(dev->bus_id), name, vargs); + va_end(vargs); + + return 0; +} +#endif + /** AGP types */ #if __OS_HAS_AGP #define DRM_AGP_MEM struct agp_memory |