From 71bc5163fa9945b71e86d22e3a4127a7ba1091fc Mon Sep 17 00:00:00 2001 From: Holger Waechtler Date: Sat, 21 Jun 2003 13:02:02 +0000 Subject: 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 --- linux/drivers/media/dvb/dvb-core/dvb_net.c | 15 +++++++-------- 1 file changed, 7 insertions(+), 8 deletions(-) (limited to 'linux/drivers/media/dvb/dvb-core') 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; idev_num; i++) + for (i=0; istate[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; idev_num; i++) { + for (i=0; istate[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; idev_num; i++) + for (i=0; istate[i] = 0; dvb_register_device (adap, &dvbnet->dvbdev, &dvbdev_net, -- cgit v1.2.3