summaryrefslogtreecommitdiff
path: root/linux
diff options
context:
space:
mode:
Diffstat (limited to 'linux')
-rw-r--r--linux/drivers/media/dvb/bt8xx/dvb-bt8xx.c5
-rw-r--r--linux/drivers/media/dvb/bt8xx/dvb-bt8xx.h2
-rw-r--r--linux/drivers/media/dvb/dvb-core/dvb_net.c15
-rw-r--r--linux/drivers/media/dvb/ttpci/av7110.c1
-rw-r--r--linux/drivers/media/dvb/ttpci/budget-core.c1
-rw-r--r--linux/drivers/media/dvb/ttusb-dec/ttusb_dec.c1
6 files changed, 13 insertions, 12 deletions
diff --git a/linux/drivers/media/dvb/bt8xx/dvb-bt8xx.c b/linux/drivers/media/dvb/bt8xx/dvb-bt8xx.c
index 9490e0cb4..1d47f90da 100644
--- a/linux/drivers/media/dvb/bt8xx/dvb-bt8xx.c
+++ b/linux/drivers/media/dvb/bt8xx/dvb-bt8xx.c
@@ -279,7 +279,9 @@ static int __init dvb_bt8xx_load(unsigned int bttv_nr, char *card_name, u32 gpio
return result;
}
-
+
+ dvb_net_init(card->adapter, &card->dvbnet, &card->demux.dmx);
+
dvb_bt8xx_tasklet.data = (long)card;
card->bt->tasklet = &dvb_bt8xx_tasklet;
@@ -305,6 +307,7 @@ static void dvb_bt8xx_close(void)
bt878_stop(card->bt);
+ dvb_net_release(&card->dvbnet);
card->demux.dmx.remove_frontend(&card->demux.dmx, &card->fe_mem);
card->demux.dmx.remove_frontend(&card->demux.dmx, &card->fe_hw);
dvb_dmxdev_release(&card->dmxdev);
diff --git a/linux/drivers/media/dvb/bt8xx/dvb-bt8xx.h b/linux/drivers/media/dvb/bt8xx/dvb-bt8xx.h
index 2b30be6b3..acdd8165c 100644
--- a/linux/drivers/media/dvb/bt8xx/dvb-bt8xx.h
+++ b/linux/drivers/media/dvb/bt8xx/dvb-bt8xx.h
@@ -24,6 +24,7 @@
#include <linux/i2c.h>
#include "dvbdev.h"
+#include "dvb_net.h"
struct dvb_bt8xx_card {
@@ -38,5 +39,6 @@ struct dvb_bt8xx_card {
struct dmx_frontend fe_mem;
u32 gpio_mode;
struct i2c_adapter *i2c_adap;
+ struct dvb_net dvbnet;
};
diff --git a/linux/drivers/media/dvb/dvb-core/dvb_net.c b/linux/drivers/media/dvb/dvb-core/dvb_net.c
index 69f3545fc..cc07299f8 100644
--- a/linux/drivers/media/dvb/dvb-core/dvb_net.c
+++ b/linux/drivers/media/dvb/dvb-core/dvb_net.c
@@ -426,11 +426,11 @@ int get_if (struct dvb_net *dvbnet)
{
int i;
- for (i=0; i<dvbnet->dev_num; i++)
+ for (i=0; i<DVB_NET_DEVICES_MAX; i++)
if (!dvbnet->state[i])
break;
- if (i == dvbnet->dev_num)
+ if (i == DVB_NET_DEVICES_MAX)
return -1;
dvbnet->state[i] = 1;
@@ -459,7 +459,7 @@ int dvb_net_add_if(struct dvb_net *dvbnet, u16 pid)
net->dma = 0;
net->mem_start = 0;
memcpy(net->name, "dvb0_0", 7);
- net->name[3] = dvbnet->card_num+0x30;
+ net->name[3] = dvbnet->dvbdev->adapter->num + '0';
net->name[5] = if_num + '0';
net->next = NULL;
net->init = dvb_net_init_dev;
@@ -530,7 +530,7 @@ int dvb_net_do_ioctl(struct inode *inode, struct file *file,
struct dvb_net_priv *priv_data;
struct dvb_net_if *dvbnetif = (struct dvb_net_if *)parg;
- if (dvbnetif->if_num >= dvbnet->dev_num ||
+ if (dvbnetif->if_num >= DVB_NET_DEVICES_MAX ||
!dvbnet->state[dvbnetif->if_num])
return -EFAULT;
@@ -584,7 +584,7 @@ void dvb_net_release (struct dvb_net *dvbnet)
dvb_unregister_device(dvbnet->dvbdev);
- for (i=0; i<dvbnet->dev_num; i++) {
+ for (i=0; i<DVB_NET_DEVICES_MAX; i++) {
if (!dvbnet->state[i])
continue;
dvb_net_remove_if(dvbnet, i);
@@ -596,11 +596,10 @@ int dvb_net_init (struct dvb_adapter *adap, struct dvb_net *dvbnet,
struct dmx_demux *dmx)
{
int i;
-
+
dvbnet->demux = dmx;
- dvbnet->dev_num = DVB_NET_DEVICES_MAX;
- for (i=0; i<dvbnet->dev_num; i++)
+ for (i=0; i<DVB_NET_DEVICES_MAX; i++)
dvbnet->state[i] = 0;
dvb_register_device (adap, &dvbnet->dvbdev, &dvbdev_net,
diff --git a/linux/drivers/media/dvb/ttpci/av7110.c b/linux/drivers/media/dvb/ttpci/av7110.c
index d749e33bb..887415ea4 100644
--- a/linux/drivers/media/dvb/ttpci/av7110.c
+++ b/linux/drivers/media/dvb/ttpci/av7110.c
@@ -4267,7 +4267,6 @@ static int av7110_register(struct av7110 *av7110)
#endif
// }
- av7110->dvb_net.card_num=av7110->dvb_adapter->num;
dvb_net_init(av7110->dvb_adapter, &av7110->dvb_net, &dvbdemux->dmx);
return 0;
diff --git a/linux/drivers/media/dvb/ttpci/budget-core.c b/linux/drivers/media/dvb/ttpci/budget-core.c
index 632fe7321..c302d05ed 100644
--- a/linux/drivers/media/dvb/ttpci/budget-core.c
+++ b/linux/drivers/media/dvb/ttpci/budget-core.c
@@ -166,7 +166,6 @@ static int budget_register(struct budget *budget)
if (ret < 0)
return ret;
- budget->dvb_net.card_num = budget->dvb_adapter->num;
dvb_net_init(budget->dvb_adapter, &budget->dvb_net, &dvbdemux->dmx);
return 0;
diff --git a/linux/drivers/media/dvb/ttusb-dec/ttusb_dec.c b/linux/drivers/media/dvb/ttusb-dec/ttusb_dec.c
index 1e9d8ddc6..9ab8baeee 100644
--- a/linux/drivers/media/dvb/ttusb-dec/ttusb_dec.c
+++ b/linux/drivers/media/dvb/ttusb-dec/ttusb_dec.c
@@ -1009,7 +1009,6 @@ ttusb_dec_init_dvb(struct ttusb_dec * dec)
sema_init(&dec->pes2ts_sem, 1);
- dec->dvb_net.card_num = dec->adapter->num;
dvb_net_init(dec->adapter, &dec->dvb_net, &dec->demux.dmx);
return 0;