summaryrefslogtreecommitdiff
path: root/linux/drivers/media
diff options
context:
space:
mode:
Diffstat (limited to 'linux/drivers/media')
-rw-r--r--linux/drivers/media/dvb/b2c2/skystar2.c15
1 files changed, 5 insertions, 10 deletions
diff --git a/linux/drivers/media/dvb/b2c2/skystar2.c b/linux/drivers/media/dvb/b2c2/skystar2.c
index 5f8f678b9..01b1b9d15 100644
--- a/linux/drivers/media/dvb/b2c2/skystar2.c
+++ b/linux/drivers/media/dvb/b2c2/skystar2.c
@@ -1146,9 +1146,8 @@ static int add_hw_pid(struct adapter *adapter, u16 pid)
if (pid <= 0x1f)
return 1;
- if (pid == 0x2000) {
- /* we can't use a filter, so no search */
- } else {
+ /* we can't use a filter for 0x2000, so no search */
+ if (pid != 0x2000) {
/* find an unused hardware filter */
for (i = 0; i < adapter->useable_hw_filters; i++) {
dprintk("%s: pid=%d searching slot=%d\n", __FUNCTION__, pid, i);
@@ -1177,9 +1176,8 @@ static int remove_hw_pid(struct adapter *adapter, u16 pid)
if (pid <= 0x1f)
return 1;
- if (pid == 0x2000) {
- /* we can't use a filter, so no search */
- } else {
+ /* we can't use a filter for 0x2000, so no search */
+ if (pid != 0x2000) {
for (i = 0; i < adapter->useable_hw_filters; i++) {
dprintk("%s: pid=%d searching slot=%d\n", __FUNCTION__, pid, i);
if (adapter->hw_pids[i] == pid) { // find the pid slot
@@ -1245,10 +1243,7 @@ static int remove_pid(struct adapter *adapter, u16 pid)
if (adapter->pid_rc[i] <= 0) {
// remove from the list
adapter->pid_count--;
- for (j = i; j < adapter->pid_count; j++) {
- adapter->pid_list[j] = adapter->pid_list[j + 1];
- adapter->pid_rc[j] = adapter->pid_rc[j + 1];
- }
+ adapter->pid_list[i]=adapter->pid_list[adapter->pid_count];
// hardware setting
remove_hw_pid(adapter, pid);
}