[dahdi-commits] sruffell: linux/trunk r9894 - /linux/trunk/include/dahdi/kernel.h
SVN commits to the DAHDI project
dahdi-commits at lists.digium.com
Mon Apr 11 13:41:55 CDT 2011
Author: sruffell
Date: Mon Apr 11 13:41:47 2011
New Revision: 9894
URL: http://svnview.digium.com/svn/dahdi?view=rev&rev=9894
Log:
dahdi: Do not define dev_name if already backported.
RHEL 5.6 has backported dev_name in include/dahdi/devices.h. We now need to
check for a back ported definition before defining our own version on pre
2.6.26 kernels.
(closes issue #18992)
Reported by: ndupeux, AlexCeli
Tested by: elguero
Signed-off-by: Tzafrir Cohen <tzafrir.cohen at xorcom.com>
Acked-by: Shaun Ruffell <sruffell at digium.com>
Modified:
linux/trunk/include/dahdi/kernel.h
Modified: linux/trunk/include/dahdi/kernel.h
URL: http://svnview.digium.com/svn/dahdi/linux/trunk/include/dahdi/kernel.h?view=diff&rev=9894&r1=9893&r2=9894
==============================================================================
--- linux/trunk/include/dahdi/kernel.h (original)
+++ linux/trunk/include/dahdi/kernel.h Mon Apr 11 13:41:47 2011
@@ -87,7 +87,13 @@
#endif
#if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,26)
-#define dev_name(dev) (dev)->bus_id
+# ifdef RHEL_RELEASE_VERSION
+# if RHEL_RELEASE_CODE < RHEL_RELEASE_VERSION(5, 6)
+#define dev_name(dev) ((dev)->bus_id)
+# endif
+# else
+#define dev_name(dev) ((dev)->bus_id)
+# endif
#define dev_set_name(dev, format, ...) \
snprintf((dev)->bus_id, BUS_ID_SIZE, format, ## __VA_ARGS__);
#endif
More information about the dahdi-commits
mailing list