diff options
author | Holger Waechtler <devnull@localhost> | 2003-06-21 13:02:02 +0000 |
---|---|---|
committer | Holger Waechtler <devnull@localhost> | 2003-06-21 13:02:02 +0000 |
commit | 71bc5163fa9945b71e86d22e3a4127a7ba1091fc (patch) | |
tree | a93a3d5491ee420715f99a2155d4cee26e1b8aa5 /linux/drivers/media/dvb/dvb-core | |
parent | b7df7335fc0cd7132912b1148c602cd757b50353 (diff) | |
download | mediapointer-dvb-s2-71bc5163fa9945b71e86d22e3a4127a7ba1091fc.tar.gz mediapointer-dvb-s2-71bc5163fa9945b71e86d22e3a4127a7ba1091fc.tar.bz2 |
code review, use adap->num instead of card_num field, card_num and dev_num are deprecated -- to be removed.
register network device for bt8xx cards
Diffstat (limited to 'linux/drivers/media/dvb/dvb-core')
-rw-r--r-- | linux/drivers/media/dvb/dvb-core/dvb_net.c | 15 |
1 files changed, 7 insertions, 8 deletions
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, |