All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] media.h: remove linux/version.h include
@ 2018-07-25 12:51 Hans Verkuil
  2018-07-25 13:14 ` Sakari Ailus
  0 siblings, 1 reply; 2+ messages in thread
From: Hans Verkuil @ 2018-07-25 12:51 UTC (permalink / raw)
  To: Linux Media Mailing List

The media.h public header is one of only three public headers that include
linux/version.h. Drop it from media.h. It was only used for an obsolete
define.

It has to be added to media-device.c, since that source relied on media.h
to include it.

Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
---
diff --git a/drivers/media/media-device.c b/drivers/media/media-device.c
index 14959b19a342..fcdf3d5dc4b6 100644
--- a/drivers/media/media-device.c
+++ b/drivers/media/media-device.c
@@ -25,6 +25,7 @@
 #include <linux/types.h>
 #include <linux/pci.h>
 #include <linux/usb.h>
+#include <linux/version.h>

 #include <media/media-device.h>
 #include <media/media-devnode.h>
diff --git a/include/uapi/linux/media.h b/include/uapi/linux/media.h
index 82ec9f132a53..36f76e777ef9 100644
--- a/include/uapi/linux/media.h
+++ b/include/uapi/linux/media.h
@@ -25,7 +25,6 @@
 #endif
 #include <linux/ioctl.h>
 #include <linux/types.h>
-#include <linux/version.h>

 struct media_device_info {
 	char driver[16];
@@ -421,7 +420,7 @@ struct media_v2_topology {
 #define MEDIA_INTF_T_ALSA_TIMER			(MEDIA_INTF_T_ALSA_BASE + 7)

 /* Obsolete symbol for media_version, no longer used in the kernel */
-#define MEDIA_API_VERSION			KERNEL_VERSION(0, 1, 0)
+#define MEDIA_API_VERSION			((0 << 16) | (1 << 8) | 0)

 #endif

^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [PATCH] media.h: remove linux/version.h include
  2018-07-25 12:51 [PATCH] media.h: remove linux/version.h include Hans Verkuil
@ 2018-07-25 13:14 ` Sakari Ailus
  0 siblings, 0 replies; 2+ messages in thread
From: Sakari Ailus @ 2018-07-25 13:14 UTC (permalink / raw)
  To: Hans Verkuil; +Cc: Linux Media Mailing List

On Wed, Jul 25, 2018 at 02:51:39PM +0200, Hans Verkuil wrote:
> The media.h public header is one of only three public headers that include
> linux/version.h. Drop it from media.h. It was only used for an obsolete
> define.
> 
> It has to be added to media-device.c, since that source relied on media.h
> to include it.
> 
> Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>

Acked-by: Sakari Ailus <sakari.ailus@linux.intel.com>

-- 
Sakari Ailus
e-mail: sakari.ailus@iki.fi

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2018-07-25 14:25 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-07-25 12:51 [PATCH] media.h: remove linux/version.h include Hans Verkuil
2018-07-25 13:14 ` Sakari Ailus

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.