mirror of
https://gitlab.freedesktop.org/mesa/drm.git
synced 2026-04-24 22:10:40 +02:00
Fix build on kernels < 2.6.26
The commit 651e3dc6dd, "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>
This commit is contained in:
parent
00fae87f96
commit
d7c42ff4c4
1 changed files with 3 additions and 14 deletions
|
|
@ -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 */
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue