aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMauro Carvalho Chehab <mchehab@redhat.com>2013-04-04 12:25:30 -0400
committerMauro Carvalho Chehab <mchehab@redhat.com>2013-04-08 05:53:15 -0400
commitfde04ab95d43e55959f12b92711b0ca4fed40637 (patch)
treeba274fcfc76b75d08907fa73b10b0a7a5a328881
parent9ea89e2b62c70f3986c89363818a89c8c11c96c4 (diff)
[media] demux.h: Remove duplicated enum
"enum dmx_ts_pes" and "typedef enum dmx_pes_type_t" are just the same enum declared twice, since Kernel (2.6.12). There's no reason to duplicate it there, and sparse complains about that: drivers/media/dvb-core/dmxdev.c:600:55: warning: mixing different enum types So, remove the internal define, keeping just the external one. Internally, use only "enum dmx_ts_pes", as it is too late to drop dmx_pes_type_t from the userspace API. Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
-rw-r--r--drivers/media/dvb-core/demux.h39
-rw-r--r--drivers/media/dvb-core/dmxdev.c2
-rw-r--r--drivers/media/dvb-core/dvb_demux.c6
-rw-r--r--drivers/media/dvb-core/dvb_demux.h4
-rw-r--r--drivers/media/dvb-core/dvb_net.c2
-rw-r--r--drivers/media/firewire/firedtv-dvb.c14
-rw-r--r--drivers/media/pci/ttpci/av7110.c6
-rw-r--r--drivers/media/usb/ttusb-budget/dvb-ttusb-budget.c10
-rw-r--r--drivers/media/usb/ttusb-dec/ttusb_dec.c20
-rw-r--r--include/uapi/linux/dvb/dmx.h2
10 files changed, 33 insertions, 72 deletions
diff --git a/drivers/media/dvb-core/demux.h b/drivers/media/dvb-core/demux.h
index eb91fd808c16..833191bcd810 100644
--- a/drivers/media/dvb-core/demux.h
+++ b/drivers/media/dvb-core/demux.h
@@ -83,45 +83,6 @@ enum dmx_success {
83#define TS_DEMUX 8 /* in case TS_PACKET is set, send the TS to 83#define TS_DEMUX 8 /* in case TS_PACKET is set, send the TS to
84 the demux device, not to the dvr device */ 84 the demux device, not to the dvr device */
85 85
86/* PES type for filters which write to built-in decoder */
87/* these should be kept identical to the types in dmx.h */
88
89enum dmx_ts_pes
90{ /* also send packets to decoder (if it exists) */
91 DMX_TS_PES_AUDIO0,
92 DMX_TS_PES_VIDEO0,
93 DMX_TS_PES_TELETEXT0,
94 DMX_TS_PES_SUBTITLE0,
95 DMX_TS_PES_PCR0,
96
97 DMX_TS_PES_AUDIO1,
98 DMX_TS_PES_VIDEO1,
99 DMX_TS_PES_TELETEXT1,
100 DMX_TS_PES_SUBTITLE1,
101 DMX_TS_PES_PCR1,
102
103 DMX_TS_PES_AUDIO2,
104 DMX_TS_PES_VIDEO2,
105 DMX_TS_PES_TELETEXT2,
106 DMX_TS_PES_SUBTITLE2,
107 DMX_TS_PES_PCR2,
108
109 DMX_TS_PES_AUDIO3,
110 DMX_TS_PES_VIDEO3,
111 DMX_TS_PES_TELETEXT3,
112 DMX_TS_PES_SUBTITLE3,
113 DMX_TS_PES_PCR3,
114
115 DMX_TS_PES_OTHER
116};
117
118#define DMX_TS_PES_AUDIO DMX_TS_PES_AUDIO0
119#define DMX_TS_PES_VIDEO DMX_TS_PES_VIDEO0
120#define DMX_TS_PES_TELETEXT DMX_TS_PES_TELETEXT0
121#define DMX_TS_PES_SUBTITLE DMX_TS_PES_SUBTITLE0
122#define DMX_TS_PES_PCR DMX_TS_PES_PCR0
123
124
125struct dmx_ts_feed { 86struct dmx_ts_feed {
126 int is_filtering; /* Set to non-zero when filtering in progress */ 87 int is_filtering; /* Set to non-zero when filtering in progress */
127 struct dmx_demux *parent; /* Back-pointer */ 88 struct dmx_demux *parent; /* Back-pointer */
diff --git a/drivers/media/dvb-core/dmxdev.c b/drivers/media/dvb-core/dmxdev.c
index 8896993e631f..a1a3a5159d71 100644
--- a/drivers/media/dvb-core/dmxdev.c
+++ b/drivers/media/dvb-core/dmxdev.c
@@ -569,7 +569,7 @@ static int dvb_dmxdev_start_feed(struct dmxdev *dmxdev,
569 dmx_output_t otype; 569 dmx_output_t otype;
570 int ret; 570 int ret;
571 int ts_type; 571 int ts_type;
572 dmx_pes_type_t ts_pes; 572 enum dmx_ts_pes ts_pes;
573 struct dmx_ts_feed *tsfeed; 573 struct dmx_ts_feed *tsfeed;
574 574
575 feed->ts = NULL; 575 feed->ts = NULL;
diff --git a/drivers/media/dvb-core/dvb_demux.c b/drivers/media/dvb-core/dvb_demux.c
index 71641b2dde6b..3485655fa082 100644
--- a/drivers/media/dvb-core/dvb_demux.c
+++ b/drivers/media/dvb-core/dvb_demux.c
@@ -674,7 +674,7 @@ static int dmx_ts_feed_set(struct dmx_ts_feed *ts_feed, u16 pid, int ts_type,
674 return -ERESTARTSYS; 674 return -ERESTARTSYS;
675 675
676 if (ts_type & TS_DECODER) { 676 if (ts_type & TS_DECODER) {
677 if (pes_type >= DMX_TS_PES_OTHER) { 677 if (pes_type >= DMX_PES_OTHER) {
678 mutex_unlock(&demux->mutex); 678 mutex_unlock(&demux->mutex);
679 return -EINVAL; 679 return -EINVAL;
680 } 680 }
@@ -846,7 +846,7 @@ static int dvbdmx_release_ts_feed(struct dmx_demux *dmx,
846 846
847 feed->pid = 0xffff; 847 feed->pid = 0xffff;
848 848
849 if (feed->ts_type & TS_DECODER && feed->pes_type < DMX_TS_PES_OTHER) 849 if (feed->ts_type & TS_DECODER && feed->pes_type < DMX_PES_OTHER)
850 demux->pesfilter[feed->pes_type] = NULL; 850 demux->pesfilter[feed->pes_type] = NULL;
851 851
852 mutex_unlock(&demux->mutex); 852 mutex_unlock(&demux->mutex);
@@ -1268,7 +1268,7 @@ int dvb_dmx_init(struct dvb_demux *dvbdemux)
1268 1268
1269 INIT_LIST_HEAD(&dvbdemux->frontend_list); 1269 INIT_LIST_HEAD(&dvbdemux->frontend_list);
1270 1270
1271 for (i = 0; i < DMX_TS_PES_OTHER; i++) { 1271 for (i = 0; i < DMX_PES_OTHER; i++) {
1272 dvbdemux->pesfilter[i] = NULL; 1272 dvbdemux->pesfilter[i] = NULL;
1273 dvbdemux->pids[i] = 0xffff; 1273 dvbdemux->pids[i] = 0xffff;
1274 } 1274 }
diff --git a/drivers/media/dvb-core/dvb_demux.h b/drivers/media/dvb-core/dvb_demux.h
index fa7188a253aa..ae7fc33c3231 100644
--- a/drivers/media/dvb-core/dvb_demux.h
+++ b/drivers/media/dvb-core/dvb_demux.h
@@ -119,8 +119,8 @@ struct dvb_demux {
119 119
120 struct list_head frontend_list; 120 struct list_head frontend_list;
121 121
122 struct dvb_demux_feed *pesfilter[DMX_TS_PES_OTHER]; 122 struct dvb_demux_feed *pesfilter[DMX_PES_OTHER];
123 u16 pids[DMX_TS_PES_OTHER]; 123 u16 pids[DMX_PES_OTHER];
124 int playing; 124 int playing;
125 int recording; 125 int recording;
126 126
diff --git a/drivers/media/dvb-core/dvb_net.c b/drivers/media/dvb-core/dvb_net.c
index 44225b186f6d..e17cb85d3ecf 100644
--- a/drivers/media/dvb-core/dvb_net.c
+++ b/drivers/media/dvb-core/dvb_net.c
@@ -1044,7 +1044,7 @@ static int dvb_net_feed_start(struct net_device *dev)
1044 ret = priv->tsfeed->set(priv->tsfeed, 1044 ret = priv->tsfeed->set(priv->tsfeed,
1045 priv->pid, /* pid */ 1045 priv->pid, /* pid */
1046 TS_PACKET, /* type */ 1046 TS_PACKET, /* type */
1047 DMX_TS_PES_OTHER, /* pes type */ 1047 DMX_PES_OTHER, /* pes type */
1048 32768, /* circular buffer size */ 1048 32768, /* circular buffer size */
1049 timeout /* timeout */ 1049 timeout /* timeout */
1050 ); 1050 );
diff --git a/drivers/media/firewire/firedtv-dvb.c b/drivers/media/firewire/firedtv-dvb.c
index eb7496eab130..f710e17953e3 100644
--- a/drivers/media/firewire/firedtv-dvb.c
+++ b/drivers/media/firewire/firedtv-dvb.c
@@ -71,11 +71,11 @@ int fdtv_start_feed(struct dvb_demux_feed *dvbdmxfeed)
71 71
72 if (dvbdmxfeed->type == DMX_TYPE_TS) { 72 if (dvbdmxfeed->type == DMX_TYPE_TS) {
73 switch (dvbdmxfeed->pes_type) { 73 switch (dvbdmxfeed->pes_type) {
74 case DMX_TS_PES_VIDEO: 74 case DMX_PES_VIDEO:
75 case DMX_TS_PES_AUDIO: 75 case DMX_PES_AUDIO:
76 case DMX_TS_PES_TELETEXT: 76 case DMX_PES_TELETEXT:
77 case DMX_TS_PES_PCR: 77 case DMX_PES_PCR:
78 case DMX_TS_PES_OTHER: 78 case DMX_PES_OTHER:
79 c = alloc_channel(fdtv); 79 c = alloc_channel(fdtv);
80 break; 80 break;
81 default: 81 default:
@@ -132,7 +132,7 @@ int fdtv_stop_feed(struct dvb_demux_feed *dvbdmxfeed)
132 (demux->dmx.frontend->source != DMX_MEMORY_FE))) { 132 (demux->dmx.frontend->source != DMX_MEMORY_FE))) {
133 133
134 if (dvbdmxfeed->ts_type & TS_DECODER) { 134 if (dvbdmxfeed->ts_type & TS_DECODER) {
135 if (dvbdmxfeed->pes_type >= DMX_TS_PES_OTHER || 135 if (dvbdmxfeed->pes_type >= DMX_PES_OTHER ||
136 !demux->pesfilter[dvbdmxfeed->pes_type]) 136 !demux->pesfilter[dvbdmxfeed->pes_type])
137 return -EINVAL; 137 return -EINVAL;
138 138
@@ -141,7 +141,7 @@ int fdtv_stop_feed(struct dvb_demux_feed *dvbdmxfeed)
141 } 141 }
142 142
143 if (!(dvbdmxfeed->ts_type & TS_DECODER && 143 if (!(dvbdmxfeed->ts_type & TS_DECODER &&
144 dvbdmxfeed->pes_type < DMX_TS_PES_OTHER)) 144 dvbdmxfeed->pes_type < DMX_PES_OTHER))
145 return 0; 145 return 0;
146 } 146 }
147 147
diff --git a/drivers/media/pci/ttpci/av7110.c b/drivers/media/pci/ttpci/av7110.c
index 3dc7aa9b6f40..f38329d29daa 100644
--- a/drivers/media/pci/ttpci/av7110.c
+++ b/drivers/media/pci/ttpci/av7110.c
@@ -990,7 +990,7 @@ static int av7110_start_feed(struct dvb_demux_feed *feed)
990 990
991 if (feed->type == DMX_TYPE_TS) { 991 if (feed->type == DMX_TYPE_TS) {
992 if ((feed->ts_type & TS_DECODER) && 992 if ((feed->ts_type & TS_DECODER) &&
993 (feed->pes_type <= DMX_TS_PES_PCR)) { 993 (feed->pes_type <= DMX_PES_PCR)) {
994 switch (demux->dmx.frontend->source) { 994 switch (demux->dmx.frontend->source) {
995 case DMX_MEMORY_FE: 995 case DMX_MEMORY_FE:
996 if (feed->ts_type & TS_DECODER) 996 if (feed->ts_type & TS_DECODER)
@@ -1051,14 +1051,14 @@ static int av7110_stop_feed(struct dvb_demux_feed *feed)
1051 1051
1052 if (feed->type == DMX_TYPE_TS) { 1052 if (feed->type == DMX_TYPE_TS) {
1053 if (feed->ts_type & TS_DECODER) { 1053 if (feed->ts_type & TS_DECODER) {
1054 if (feed->pes_type >= DMX_TS_PES_OTHER || 1054 if (feed->pes_type >= DMX_PES_OTHER ||
1055 !demux->pesfilter[feed->pes_type]) 1055 !demux->pesfilter[feed->pes_type])
1056 return -EINVAL; 1056 return -EINVAL;
1057 demux->pids[feed->pes_type] |= 0x8000; 1057 demux->pids[feed->pes_type] |= 0x8000;
1058 demux->pesfilter[feed->pes_type] = NULL; 1058 demux->pesfilter[feed->pes_type] = NULL;
1059 } 1059 }
1060 if (feed->ts_type & TS_DECODER && 1060 if (feed->ts_type & TS_DECODER &&
1061 feed->pes_type < DMX_TS_PES_OTHER) { 1061 feed->pes_type < DMX_PES_OTHER) {
1062 ret = dvb_feed_stop_pid(feed); 1062 ret = dvb_feed_stop_pid(feed);
1063 } else 1063 } else
1064 if ((feed->ts_type & TS_PACKET) && 1064 if ((feed->ts_type & TS_PACKET) &&
diff --git a/drivers/media/usb/ttusb-budget/dvb-ttusb-budget.c b/drivers/media/usb/ttusb-budget/dvb-ttusb-budget.c
index e40718552850..21b9049c7b3f 100644
--- a/drivers/media/usb/ttusb-budget/dvb-ttusb-budget.c
+++ b/drivers/media/usb/ttusb-budget/dvb-ttusb-budget.c
@@ -930,11 +930,11 @@ static int ttusb_start_feed(struct dvb_demux_feed *dvbdmxfeed)
930 930
931 if (dvbdmxfeed->type == DMX_TYPE_TS) { 931 if (dvbdmxfeed->type == DMX_TYPE_TS) {
932 switch (dvbdmxfeed->pes_type) { 932 switch (dvbdmxfeed->pes_type) {
933 case DMX_TS_PES_VIDEO: 933 case DMX_PES_VIDEO:
934 case DMX_TS_PES_AUDIO: 934 case DMX_PES_AUDIO:
935 case DMX_TS_PES_TELETEXT: 935 case DMX_PES_TELETEXT:
936 case DMX_TS_PES_PCR: 936 case DMX_PES_PCR:
937 case DMX_TS_PES_OTHER: 937 case DMX_PES_OTHER:
938 break; 938 break;
939 default: 939 default:
940 return -EINVAL; 940 return -EINVAL;
diff --git a/drivers/media/usb/ttusb-dec/ttusb_dec.c b/drivers/media/usb/ttusb-dec/ttusb_dec.c
index 504c81230339..e52c3b97f304 100644
--- a/drivers/media/usb/ttusb-dec/ttusb_dec.c
+++ b/drivers/media/usb/ttusb-dec/ttusb_dec.c
@@ -951,34 +951,34 @@ static int ttusb_dec_start_ts_feed(struct dvb_demux_feed *dvbdmxfeed)
951 951
952 switch (dvbdmxfeed->pes_type) { 952 switch (dvbdmxfeed->pes_type) {
953 953
954 case DMX_TS_PES_VIDEO: 954 case DMX_PES_VIDEO:
955 dprintk(" pes_type: DMX_TS_PES_VIDEO\n"); 955 dprintk(" pes_type: DMX_PES_VIDEO\n");
956 dec->pid[DMX_PES_PCR] = dvbdmxfeed->pid; 956 dec->pid[DMX_PES_PCR] = dvbdmxfeed->pid;
957 dec->pid[DMX_PES_VIDEO] = dvbdmxfeed->pid; 957 dec->pid[DMX_PES_VIDEO] = dvbdmxfeed->pid;
958 dec->video_filter = dvbdmxfeed->filter; 958 dec->video_filter = dvbdmxfeed->filter;
959 ttusb_dec_set_pids(dec); 959 ttusb_dec_set_pids(dec);
960 break; 960 break;
961 961
962 case DMX_TS_PES_AUDIO: 962 case DMX_PES_AUDIO:
963 dprintk(" pes_type: DMX_TS_PES_AUDIO\n"); 963 dprintk(" pes_type: DMX_PES_AUDIO\n");
964 dec->pid[DMX_PES_AUDIO] = dvbdmxfeed->pid; 964 dec->pid[DMX_PES_AUDIO] = dvbdmxfeed->pid;
965 dec->audio_filter = dvbdmxfeed->filter; 965 dec->audio_filter = dvbdmxfeed->filter;
966 ttusb_dec_set_pids(dec); 966 ttusb_dec_set_pids(dec);
967 break; 967 break;
968 968
969 case DMX_TS_PES_TELETEXT: 969 case DMX_PES_TELETEXT:
970 dec->pid[DMX_PES_TELETEXT] = dvbdmxfeed->pid; 970 dec->pid[DMX_PES_TELETEXT] = dvbdmxfeed->pid;
971 dprintk(" pes_type: DMX_TS_PES_TELETEXT(not supported)\n"); 971 dprintk(" pes_type: DMX_PES_TELETEXT(not supported)\n");
972 return -ENOSYS; 972 return -ENOSYS;
973 973
974 case DMX_TS_PES_PCR: 974 case DMX_PES_PCR:
975 dprintk(" pes_type: DMX_TS_PES_PCR\n"); 975 dprintk(" pes_type: DMX_PES_PCR\n");
976 dec->pid[DMX_PES_PCR] = dvbdmxfeed->pid; 976 dec->pid[DMX_PES_PCR] = dvbdmxfeed->pid;
977 ttusb_dec_set_pids(dec); 977 ttusb_dec_set_pids(dec);
978 break; 978 break;
979 979
980 case DMX_TS_PES_OTHER: 980 case DMX_PES_OTHER:
981 dprintk(" pes_type: DMX_TS_PES_OTHER(not supported)\n"); 981 dprintk(" pes_type: DMX_PES_OTHER(not supported)\n");
982 return -ENOSYS; 982 return -ENOSYS;
983 983
984 default: 984 default:
diff --git a/include/uapi/linux/dvb/dmx.h b/include/uapi/linux/dvb/dmx.h
index b2a9ad8cafdc..b4fb650d9d4f 100644
--- a/include/uapi/linux/dvb/dmx.h
+++ b/include/uapi/linux/dvb/dmx.h
@@ -51,7 +51,7 @@ typedef enum
51} dmx_input_t; 51} dmx_input_t;
52 52
53 53
54typedef enum 54typedef enum dmx_ts_pes
55{ 55{
56 DMX_PES_AUDIO0, 56 DMX_PES_AUDIO0,
57 DMX_PES_VIDEO0, 57 DMX_PES_VIDEO0,