[linux-dvb] [PATCH] remove 'pid' from struct dmxdev_filter

Andreas Oberritter obi at linuxtv.org
Thu Mar 9 05:54:05 CET 2006


From: Andreas Oberritter <obi at linuxtv.org>

The PID value is already stored in struct dmx_sct_filter_params which is
a member of struct dmxdev_filter.

Signed-off-by: Andreas Oberritter <obi at linuxtv.org>
---

diff -r fdc2dd1eb459 linux/drivers/media/dvb/dvb-core/dmxdev.c
--- a/linux/drivers/media/dvb/dvb-core/dmxdev.c	Wed Mar  8 11:53:44 2006 -0300
+++ b/linux/drivers/media/dvb/dvb-core/dmxdev.c	Thu Mar  9 05:45:11 2006 +0100
@@ -454,7 +454,7 @@ static int dvb_dmxdev_feed_restart(struc
 	for (i=0; i<dmxdev->filternum; i++)
 		if (dmxdev->filter[i].state>=DMXDEV_STATE_GO &&
 		    dmxdev->filter[i].type==DMXDEV_TYPE_SEC &&
-		    dmxdev->filter[i].pid==pid) {
+		    dmxdev->filter[i].params.sec.pid==pid) {
 			dvb_dmxdev_feed_start(&dmxdev->filter[i]);
 			return 0;
 		}
@@ -505,7 +505,6 @@ static inline int dvb_dmxdev_filter_rese
 		return 0;
 
 	dmxdevfilter->type=DMXDEV_TYPE_NONE;
-	dmxdevfilter->pid=0xffff;
 	dvb_dmxdev_filter_state_set(dmxdevfilter, DMXDEV_STATE_ALLOCATED);
 	return 0;
 }
@@ -546,8 +545,8 @@ static int dvb_dmxdev_filter_start(struc
 		/* find active filter/feed with same PID */
 		for (i=0; i<dmxdev->filternum; i++) {
 			if (dmxdev->filter[i].state >= DMXDEV_STATE_GO &&
-			    dmxdev->filter[i].pid == para->pid &&
-			    dmxdev->filter[i].type == DMXDEV_TYPE_SEC) {
+			    dmxdev->filter[i].type == DMXDEV_TYPE_SEC &&
+			    dmxdev->filter[i].params.sec.pid == para->pid) {
 				*secfeed = dmxdev->filter[i].feed.sec;
 				break;
 			}
@@ -756,7 +755,6 @@ static int dvb_dmxdev_filter_set(struct 
 	dvb_dmxdev_filter_stop(dmxdevfilter);
 
 	dmxdevfilter->type=DMXDEV_TYPE_SEC;
-	dmxdevfilter->pid=params->pid;
 	memcpy(&dmxdevfilter->params.sec,
 	       params, sizeof(struct dmx_sct_filter_params));
 	invert_mode(&dmxdevfilter->params.sec.filter);
@@ -778,7 +776,6 @@ static int dvb_dmxdev_pes_filter_set(str
 		return -EINVAL;
 
 	dmxdevfilter->type=DMXDEV_TYPE_PES;
-	dmxdevfilter->pid=params->pid;
 	memcpy(&dmxdevfilter->params, params, sizeof(struct dmx_pes_filter_params));
 
 	dvb_dmxdev_filter_state_set(dmxdevfilter, DMXDEV_STATE_SET);
diff -r fdc2dd1eb459 linux/drivers/media/dvb/dvb-core/dmxdev.h
--- a/linux/drivers/media/dvb/dvb-core/dmxdev.h	Wed Mar  8 11:53:44 2006 -0300
+++ b/linux/drivers/media/dvb/dvb-core/dmxdev.h	Thu Mar  9 05:45:11 2006 +0100
@@ -96,8 +96,6 @@ struct dmxdev_filter {
 	struct timer_list timer;
 	int todo;
 	u8 secheader[3];
-
-	u16 pid;
 };
 
 





More information about the linux-dvb mailing list