diff options
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/isdn/hardware/mISDN/hfcmulti.c | 6 | ||||
-rw-r--r-- | drivers/isdn/hardware/mISDN/hfcpci.c | 2 | ||||
-rw-r--r-- | drivers/isdn/mISDN/l1oip_core.c | 6 | ||||
-rw-r--r-- | drivers/isdn/mISDN/socket.c | 4 |
4 files changed, 8 insertions, 10 deletions
diff --git a/drivers/isdn/hardware/mISDN/hfcmulti.c b/drivers/isdn/hardware/mISDN/hfcmulti.c index 2649ea55a9e8..10144e871c06 100644 --- a/drivers/isdn/hardware/mISDN/hfcmulti.c +++ b/drivers/isdn/hardware/mISDN/hfcmulti.c | |||
@@ -3971,7 +3971,7 @@ open_bchannel(struct hfc_multi *hc, struct dchannel *dch, | |||
3971 | struct bchannel *bch; | 3971 | struct bchannel *bch; |
3972 | int ch; | 3972 | int ch; |
3973 | 3973 | ||
3974 | if (!test_bit(rq->adr.channel, &dch->dev.channelmap[0])) | 3974 | if (!test_channelmap(rq->adr.channel, dch->dev.channelmap)) |
3975 | return -EINVAL; | 3975 | return -EINVAL; |
3976 | if (rq->protocol == ISDN_P_NONE) | 3976 | if (rq->protocol == ISDN_P_NONE) |
3977 | return -EINVAL; | 3977 | return -EINVAL; |
@@ -4587,7 +4587,7 @@ init_e1_port(struct hfc_multi *hc, struct hm_map *m) | |||
4587 | list_add(&bch->ch.list, &dch->dev.bchannels); | 4587 | list_add(&bch->ch.list, &dch->dev.bchannels); |
4588 | hc->chan[ch].bch = bch; | 4588 | hc->chan[ch].bch = bch; |
4589 | hc->chan[ch].port = 0; | 4589 | hc->chan[ch].port = 0; |
4590 | test_and_set_bit(bch->nr, &dch->dev.channelmap[0]); | 4590 | set_channelmap(bch->nr, dch->dev.channelmap); |
4591 | } | 4591 | } |
4592 | /* set optical line type */ | 4592 | /* set optical line type */ |
4593 | if (port[Port_cnt] & 0x001) { | 4593 | if (port[Port_cnt] & 0x001) { |
@@ -4755,7 +4755,7 @@ init_multi_port(struct hfc_multi *hc, int pt) | |||
4755 | list_add(&bch->ch.list, &dch->dev.bchannels); | 4755 | list_add(&bch->ch.list, &dch->dev.bchannels); |
4756 | hc->chan[i + ch].bch = bch; | 4756 | hc->chan[i + ch].bch = bch; |
4757 | hc->chan[i + ch].port = pt; | 4757 | hc->chan[i + ch].port = pt; |
4758 | test_and_set_bit(bch->nr, &dch->dev.channelmap[0]); | 4758 | set_channelmap(bch->nr, dch->dev.channelmap); |
4759 | } | 4759 | } |
4760 | /* set master clock */ | 4760 | /* set master clock */ |
4761 | if (port[Port_cnt] & 0x001) { | 4761 | if (port[Port_cnt] & 0x001) { |
diff --git a/drivers/isdn/hardware/mISDN/hfcpci.c b/drivers/isdn/hardware/mISDN/hfcpci.c index 3231814e7efa..9cf5edbb1a9b 100644 --- a/drivers/isdn/hardware/mISDN/hfcpci.c +++ b/drivers/isdn/hardware/mISDN/hfcpci.c | |||
@@ -2056,7 +2056,7 @@ setup_card(struct hfc_pci *card) | |||
2056 | card->dch.dev.nrbchan = 2; | 2056 | card->dch.dev.nrbchan = 2; |
2057 | for (i = 0; i < 2; i++) { | 2057 | for (i = 0; i < 2; i++) { |
2058 | card->bch[i].nr = i + 1; | 2058 | card->bch[i].nr = i + 1; |
2059 | test_and_set_bit(i + 1, &card->dch.dev.channelmap[0]); | 2059 | set_channelmap(i + 1, card->dch.dev.channelmap); |
2060 | card->bch[i].debug = debug; | 2060 | card->bch[i].debug = debug; |
2061 | mISDN_initbchannel(&card->bch[i], MAX_DATA_MEM); | 2061 | mISDN_initbchannel(&card->bch[i], MAX_DATA_MEM); |
2062 | card->bch[i].hw = card; | 2062 | card->bch[i].hw = card; |
diff --git a/drivers/isdn/mISDN/l1oip_core.c b/drivers/isdn/mISDN/l1oip_core.c index 155b99780c4f..e42150a57780 100644 --- a/drivers/isdn/mISDN/l1oip_core.c +++ b/drivers/isdn/mISDN/l1oip_core.c | |||
@@ -1006,8 +1006,7 @@ open_bchannel(struct l1oip *hc, struct dchannel *dch, struct channel_req *rq) | |||
1006 | struct bchannel *bch; | 1006 | struct bchannel *bch; |
1007 | int ch; | 1007 | int ch; |
1008 | 1008 | ||
1009 | if (!test_bit(rq->adr.channel & 0x1f, | 1009 | if (!test_channelmap(rq->adr.channel, dch->dev.channelmap)) |
1010 | &dch->dev.channelmap[rq->adr.channel >> 5])) | ||
1011 | return -EINVAL; | 1010 | return -EINVAL; |
1012 | if (rq->protocol == ISDN_P_NONE) | 1011 | if (rq->protocol == ISDN_P_NONE) |
1013 | return -EINVAL; | 1012 | return -EINVAL; |
@@ -1412,8 +1411,7 @@ init_card(struct l1oip *hc, int pri, int bundle) | |||
1412 | bch->ch.nr = i + ch; | 1411 | bch->ch.nr = i + ch; |
1413 | list_add(&bch->ch.list, &dch->dev.bchannels); | 1412 | list_add(&bch->ch.list, &dch->dev.bchannels); |
1414 | hc->chan[i + ch].bch = bch; | 1413 | hc->chan[i + ch].bch = bch; |
1415 | test_and_set_bit(bch->nr & 0x1f, | 1414 | set_channelmap(bch->nr, dch->dev.channelmap); |
1416 | &dch->dev.channelmap[bch->nr >> 5]); | ||
1417 | } | 1415 | } |
1418 | ret = mISDN_register_device(&dch->dev, hc->name); | 1416 | ret = mISDN_register_device(&dch->dev, hc->name); |
1419 | if (ret) | 1417 | if (ret) |
diff --git a/drivers/isdn/mISDN/socket.c b/drivers/isdn/mISDN/socket.c index 4ba4cc364c9e..e5a20f9542d1 100644 --- a/drivers/isdn/mISDN/socket.c +++ b/drivers/isdn/mISDN/socket.c | |||
@@ -379,7 +379,7 @@ data_sock_ioctl(struct socket *sock, unsigned int cmd, unsigned long arg) | |||
379 | di.Bprotocols = dev->Bprotocols | get_all_Bprotocols(); | 379 | di.Bprotocols = dev->Bprotocols | get_all_Bprotocols(); |
380 | di.protocol = dev->D.protocol; | 380 | di.protocol = dev->D.protocol; |
381 | memcpy(di.channelmap, dev->channelmap, | 381 | memcpy(di.channelmap, dev->channelmap, |
382 | MISDN_CHMAP_SIZE * 4); | 382 | sizeof(di.channelmap)); |
383 | di.nrbchan = dev->nrbchan; | 383 | di.nrbchan = dev->nrbchan; |
384 | strcpy(di.name, dev->name); | 384 | strcpy(di.name, dev->name); |
385 | if (copy_to_user((void __user *)arg, &di, sizeof(di))) | 385 | if (copy_to_user((void __user *)arg, &di, sizeof(di))) |
@@ -637,7 +637,7 @@ base_sock_ioctl(struct socket *sock, unsigned int cmd, unsigned long arg) | |||
637 | di.Bprotocols = dev->Bprotocols | get_all_Bprotocols(); | 637 | di.Bprotocols = dev->Bprotocols | get_all_Bprotocols(); |
638 | di.protocol = dev->D.protocol; | 638 | di.protocol = dev->D.protocol; |
639 | memcpy(di.channelmap, dev->channelmap, | 639 | memcpy(di.channelmap, dev->channelmap, |
640 | MISDN_CHMAP_SIZE * 4); | 640 | sizeof(di.channelmap)); |
641 | di.nrbchan = dev->nrbchan; | 641 | di.nrbchan = dev->nrbchan; |
642 | strcpy(di.name, dev->name); | 642 | strcpy(di.name, dev->name); |
643 | if (copy_to_user((void __user *)arg, &di, sizeof(di))) | 643 | if (copy_to_user((void __user *)arg, &di, sizeof(di))) |