[PATCH] Use dev->bus_id instead of dev_name in pre 2.6.26 kernels

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



From: Laurent Pinchart <laurent.pinchart@xxxxxxxxxxxxxxxx>

dev_name() is not available before 2.6.26. Daily builds get particularly
noisy due to the function being called in include/media/v4l2-dev.h. Fix
this with a kernel version check instead of including compat.h as that
would increase compilation time.

Priority: normal
kernel-sync

Signed-off-by: Laurent Pinchart <laurent.pinchart@xxxxxxxxxxxxxxxx>

diff -r 065f9e34e07b linux/include/media/v4l2-dev.h
--- a/linux/include/media/v4l2-dev.h	Mon Dec 07 10:08:33 2009 -0200
+++ b/linux/include/media/v4l2-dev.h	Wed Dec 09 11:04:51 2009 +0100
@@ -156,8 +156,12 @@
 #if LINUX_VERSION_CODE < KERNEL_VERSION(2, 6, 19)
 	return vdev->dev.class_id;
 #else
+#if LINUX_VERSION_CODE < KERNEL_VERSION(2, 6, 26)
+	return vdev->dev.bus_id;
+#else
 	return dev_name(&vdev->dev);
 #endif
+#endif
 }
 
 static inline int video_is_registered(struct video_device *vdev)

-- 
Laurent Pinchart
--
To unsubscribe from this list: send the line "unsubscribe linux-media" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Linux Input]     [Video for Linux]     [Gstreamer Embedded]     [Mplayer Users]     [Linux USB Devel]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [Yosemite Backpacking]
  Powered by Linux