Set media_version to LINUX_VERSION_CODE, just as we did for driver_version. Nobody ever rememebers to update the version number, but LINUX_VERSION_CODE will always be updated. Move the MEDIA_API_VERSION define to the ifndef __KERNEL__ section of the media.h header. That way kernelspace can't accidentally start to use it again.
Showing the changes to include/uapi/linux (1 of 2 files). Show all
Unified · Split
| @@ -30,8 +30,6 @@ · 29 unmodified lines | |||
| 30 | #include <linux/types.h> | 30 | #include <linux/types.h> |
| 31 | #include <linux/version.h> | 31 | #include <linux/version.h> |
| 32 | 32 | ||
| 33 | #define MEDIA_API_VERSION KERNEL_VERSION(0, 1, 0) | ||
| 34 | |||
| 35 | struct media_device_info { | 33 | struct media_device_info { |
| 36 | char driver[16]; | 34 | char driver[16]; |
| 37 | char model[32]; | 35 | char model[32]; |
| @@ -187,6 +185,9 @@ struct media_device_info { · 149 unmodified lines | |||
| 187 | #define MEDIA_ENT_T_V4L2_SUBDEV_LENS MEDIA_ENT_F_LENS | 185 | #define MEDIA_ENT_T_V4L2_SUBDEV_LENS MEDIA_ENT_F_LENS |
| 188 | #define MEDIA_ENT_T_V4L2_SUBDEV_DECODER MEDIA_ENT_F_ATV_DECODER | 186 | #define MEDIA_ENT_T_V4L2_SUBDEV_DECODER MEDIA_ENT_F_ATV_DECODER |
| 189 | #define MEDIA_ENT_T_V4L2_SUBDEV_TUNER MEDIA_ENT_F_TUNER | 187 | #define MEDIA_ENT_T_V4L2_SUBDEV_TUNER MEDIA_ENT_F_TUNER |
| 188 | |||
| 189 | /* Obsolete symbol for media_version, no longer used in the kernel */ | ||
| 190 | #define MEDIA_API_VERSION KERNEL_VERSION(0, 1, 0) | ||
| 190 | #endif | 191 | #endif |
| 191 | 192 | ||
| 192 | /* Entity flags */ | 193 | /* Entity flags */ |