History

[media] media: Fix DVB devnode representation at media controller

The previous provision for DVB media controller support were to define an ID (likely meaning the adapter number) for the DVB devnodes. This is just plain wrong. Just like V4L, DVB devices (and any other device node)) are uniquely identified via a (major, minor) tuple. This is enough to uniquely identify a devnode, no matter what API it implements. So, before we go too far, let's mark the old v4l, fb, dvb and alsa "devnode" info as deprecated, and just call it as "dev". We can latter add fields specific to each API if needed. As we don't want to break compilation on already existing apps, let's just keep the old definitions as-is, adding a note that those are deprecated at media-entity.h.

Mauro Carvalho Chehab committed 11 years ago

Commit e31a0ba1 parent bc0c5aa4 files · +20 −15Browse files

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

Unified · Split

include/uapi/linux/media.h+15−0
@@ -75,6 +75,20 @@ struct media_entity_desc { · 74 unmodified lines
7575
7676 union {
7777 /* Node specifications */
78+ struct {
79+ __u32 major;
80+ __u32 minor;
81+ } dev;
82+
83+#if 1
84+ /*
85+ * DEPRECATED: previous node specifications. Kept just to
86+ * avoid breaking compilation, but media_entity_desc.dev
87+ * should be used instead. In particular, alsa and dvb
88+ * fields below are wrong: for all devnodes, there should
89+ * be just major/minor inside the struct, as this is enough
90+ * to represent any devnode, no matter what type.
91+ */
7892 struct {
7993 __u32 major;
8094 __u32 minor;
@@ -89,6 +103,7 @@ struct media_entity_desc { · 8 unmodified lines
89103 __u32 subdevice;
90104 } alsa;
91105 int dvb;
106+#endif
92107
93108 /* Sub-device specifications */
94109 /* Nothing needed yet */

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