diff options
Diffstat (limited to 'drivers/isdn')
-rw-r--r-- | drivers/isdn/capi/Kconfig | 2 | ||||
-rw-r--r-- | drivers/isdn/hardware/mISDN/hfcpci.c | 12 | ||||
-rw-r--r-- | drivers/isdn/hardware/mISDN/hfcsusb.c | 3 | ||||
-rw-r--r-- | drivers/isdn/hardware/mISDN/netjet.c | 8 | ||||
-rw-r--r-- | drivers/isdn/mISDN/socket.c | 10 |
5 files changed, 17 insertions, 18 deletions
diff --git a/drivers/isdn/capi/Kconfig b/drivers/isdn/capi/Kconfig index cc408ad9aafb..fdb43a632215 100644 --- a/drivers/isdn/capi/Kconfig +++ b/drivers/isdn/capi/Kconfig @@ -5,7 +5,7 @@ config ISDN_CAPI This provides CAPI (the Common ISDN Application Programming Interface) Version 2.0, a standard making it easy for programs to access ISDN hardware in a device independent way. (For details see - <http://www.capi.org/>.) CAPI supports making and accepting voice + <https://www.capi.org/>.) CAPI supports making and accepting voice and data connections, controlling call options and protocols, as well as ISDN supplementary services like call forwarding or three-party conferences (if supported by the specific hardware diff --git a/drivers/isdn/hardware/mISDN/hfcpci.c b/drivers/isdn/hardware/mISDN/hfcpci.c index abdf787c1a71..904a4f4c5ff9 100644 --- a/drivers/isdn/hardware/mISDN/hfcpci.c +++ b/drivers/isdn/hardware/mISDN/hfcpci.c @@ -158,7 +158,8 @@ release_io_hfcpci(struct hfc_pci *hc) /* disable memory mapped ports + busmaster */ pci_write_config_word(hc->pdev, PCI_COMMAND, 0); del_timer(&hc->hw.timer); - pci_free_consistent(hc->pdev, 0x8000, hc->hw.fifos, hc->hw.dmahandle); + dma_free_coherent(&hc->pdev->dev, 0x8000, hc->hw.fifos, + hc->hw.dmahandle); iounmap(hc->hw.pci_io); } @@ -2004,8 +2005,9 @@ setup_hw(struct hfc_pci *hc) } /* Allocate memory for FIFOS */ /* the memory needs to be on a 32k boundary within the first 4G */ - pci_set_dma_mask(hc->pdev, 0xFFFF8000); - buffer = pci_alloc_consistent(hc->pdev, 0x8000, &hc->hw.dmahandle); + dma_set_mask(&hc->pdev->dev, 0xFFFF8000); + buffer = dma_alloc_coherent(&hc->pdev->dev, 0x8000, &hc->hw.dmahandle, + GFP_KERNEL); /* We silently assume the address is okay if nonzero */ if (!buffer) { printk(KERN_WARNING @@ -2018,8 +2020,8 @@ setup_hw(struct hfc_pci *hc) if (unlikely(!hc->hw.pci_io)) { printk(KERN_WARNING "HFC-PCI: Error in ioremap for PCI!\n"); - pci_free_consistent(hc->pdev, 0x8000, hc->hw.fifos, - hc->hw.dmahandle); + dma_free_coherent(&hc->pdev->dev, 0x8000, hc->hw.fifos, + hc->hw.dmahandle); return 1; } diff --git a/drivers/isdn/hardware/mISDN/hfcsusb.c b/drivers/isdn/hardware/mISDN/hfcsusb.c index 621364bb6b12..4274906f8654 100644 --- a/drivers/isdn/hardware/mISDN/hfcsusb.c +++ b/drivers/isdn/hardware/mISDN/hfcsusb.c @@ -261,8 +261,7 @@ hfcsusb_ph_info(struct hfcsusb *hw) phi->bch[i].Flags = hw->bch[i].Flags; } _queue_data(&dch->dev.D, MPH_INFORMATION_IND, MISDN_ID_ANY, - sizeof(struct ph_info_dch) + dch->dev.nrbchan * - sizeof(struct ph_info_ch), phi, GFP_ATOMIC); + struct_size(phi, bch, dch->dev.nrbchan), phi, GFP_ATOMIC); kfree(phi); } diff --git a/drivers/isdn/hardware/mISDN/netjet.c b/drivers/isdn/hardware/mISDN/netjet.c index 6aae97e827b7..ee925b58bbce 100644 --- a/drivers/isdn/hardware/mISDN/netjet.c +++ b/drivers/isdn/hardware/mISDN/netjet.c @@ -297,8 +297,8 @@ inittiger(struct tiger_hw *card) { int i; - card->dma_p = pci_alloc_consistent(card->pdev, NJ_DMA_SIZE, - &card->dma); + card->dma_p = dma_alloc_coherent(&card->pdev->dev, NJ_DMA_SIZE, + &card->dma, GFP_ATOMIC); if (!card->dma_p) { pr_info("%s: No DMA memory\n", card->name); return -ENOMEM; @@ -965,8 +965,8 @@ nj_release(struct tiger_hw *card) kfree(card->bc[i].hrbuf); } if (card->dma_p) - pci_free_consistent(card->pdev, NJ_DMA_SIZE, - card->dma_p, card->dma); + dma_free_coherent(&card->pdev->dev, NJ_DMA_SIZE, card->dma_p, + card->dma); write_lock_irqsave(&card_lock, flags); list_del(&card->list); write_unlock_irqrestore(&card_lock, flags); diff --git a/drivers/isdn/mISDN/socket.c b/drivers/isdn/mISDN/socket.c index dff4132b3702..a6606736d8c5 100644 --- a/drivers/isdn/mISDN/socket.c +++ b/drivers/isdn/mISDN/socket.c @@ -401,20 +401,20 @@ data_sock_ioctl(struct socket *sock, unsigned int cmd, unsigned long arg) } static int data_sock_setsockopt(struct socket *sock, int level, int optname, - char __user *optval, unsigned int len) + sockptr_t optval, unsigned int len) { struct sock *sk = sock->sk; int err = 0, opt = 0; if (*debug & DEBUG_SOCKET) - printk(KERN_DEBUG "%s(%p, %d, %x, %p, %d)\n", __func__, sock, - level, optname, optval, len); + printk(KERN_DEBUG "%s(%p, %d, %x, optval, %d)\n", __func__, sock, + level, optname, len); lock_sock(sk); switch (optname) { case MISDN_TIME_STAMP: - if (get_user(opt, (int __user *)optval)) { + if (copy_from_sockptr(&opt, optval, sizeof(int))) { err = -EFAULT; break; } @@ -738,8 +738,6 @@ static const struct proto_ops base_sock_ops = { .recvmsg = sock_no_recvmsg, .listen = sock_no_listen, .shutdown = sock_no_shutdown, - .setsockopt = sock_no_setsockopt, - .getsockopt = sock_no_getsockopt, .connect = sock_no_connect, .socketpair = sock_no_socketpair, .accept = sock_no_accept, |