Instead of abusing MEDIA_ENT_T_V4L2_SUBDEV, initialize new subdev entities as MEDIA_ENT_T_UNKNOWN.
Showing the changes to include (1 of 3 files). Show all
Unified · Split
| @@ -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 types | 54 | * 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_BASE | 93 | #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) |