History

[media] v4l2-subdev: use MEDIA_ENT_T_UNKNOWN for new subdevs

Instead of abusing MEDIA_ENT_T_V4L2_SUBDEV, initialize new subdev entities as MEDIA_ENT_T_UNKNOWN.

Mauro Carvalho Chehab committed 11 years ago

Commit b50bde41 parent bf4178a3 files · +21 −1Browse files

Showing the changes to include/uapi (1 of 3 files). Show all

Unified · Split

include/uapi/linux/media.h+14−0
@@ -42,6 +42,14 @@ struct media_device_info { · 41 unmodified lines
42 42
43#define MEDIA_ENT_ID_FLAG_NEXT (1 << 31)43#define MEDIA_ENT_ID_FLAG_NEXT (1 << 31)
44 44
45/* Used values for media_entity_desc::type */
46
47/*
48 * Initial value to be used when a new entity is created
49 * Drivers should change it to something useful
50 */
51#define MEDIA_ENT_T_UNKNOWN 0x00000000
52
45/*53/*
46 * Base numbers for entity types54 * Base numbers for entity types
47 *55 *
@@ -76,6 +84,12 @@ struct media_device_info { · 28 unmodified lines
76 84
77/* V4L2 Sub-device entities */85/* V4L2 Sub-device entities */
78 86
87/*
88 * Subdevs are initialized with MEDIA_ENT_T_V4L2_SUBDEV_UNKNOWN,
89 * in order to preserve backward compatibility.
90 * Drivers should change to the proper subdev type before
91 * registering the entity.
92 */
79#define MEDIA_ENT_T_V4L2_SUBDEV_UNKNOWN MEDIA_ENT_T_V4L2_SUBDEV_BASE93#define MEDIA_ENT_T_V4L2_SUBDEV_UNKNOWN MEDIA_ENT_T_V4L2_SUBDEV_BASE
80 94
81#define MEDIA_ENT_T_V4L2_SUBDEV_SENSOR (MEDIA_ENT_T_V4L2_SUBDEV_BASE + 1)95#define MEDIA_ENT_T_V4L2_SUBDEV_SENSOR (MEDIA_ENT_T_V4L2_SUBDEV_BASE + 1)

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t