summaryrefslogtreecommitdiff
path: root/linux-core
diff options
context:
space:
mode:
authorPekka Paalanen <pq@iki.fi>2009-06-03 22:26:43 +0300
committerPekka Paalanen <pq@iki.fi>2009-06-03 22:30:42 +0300
commitd7c42ff4c445ed2cb23f4eb3a45858c110184773 (patch)
tree63cfac5b8b673ded4882f5540dfd772d74bdbb35 /linux-core
parent00fae87f96e1fc5198311feec81866bf9c53d0e1 (diff)
Fix build on kernels < 2.6.26
The commit 651e3dc6dd58a79c90db7513ee2fb28360a4560d, "drm: Fix compilation on 2.6.30" broke all builds on kernels before 2.6.26. Variadic functions cannot be inlined. The variadic inline function is replaced with a variadic macro. Also, the function dev_name() added by that same commit is never used, so it is removed. Signed-off-by: Pekka Paalanen <pq@iki.fi>
Diffstat (limited to 'linux-core')
-rw-r--r--linux-core/drm_os_linux.h17
1 files changed, 3 insertions, 14 deletions
diff --git a/linux-core/drm_os_linux.h b/linux-core/drm_os_linux.h
index be5e0991..22937118 100644
--- a/linux-core/drm_os_linux.h
+++ b/linux-core/drm_os_linux.h
@@ -39,20 +39,9 @@ typedef void irqreturn_t;
#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;
-}
+#define dev_set_name(dev, name, ...) ({ \
+ snprintf((dev)->bus_id, BUS_ID_SIZE, (name), __VA_ARGS__); \
+ 0; })
#endif
/** AGP types */