[Openchrome-devel] Fix compiling error on <2.6.26 prior to 2.6.30 patch

Neo The User neotheuser
Mon Jun 15 12:29:15 PDT 2009


diff --git a/linux-core/drm_os_linux.h b/linux-core/drm_os_linux.h
index be5e099..2293711 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 */



      
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://wiki.openchrome.org/pipermail/openchrome-devel/attachments/20090615/2f1d3a59/attachment.html



More information about the Openchrome-devel mailing list